Module Checkit { Function Agm { \\ new stack constructed at calling the Agm() with two values Repeat { Read a0, b0 Push Sqrt(a0*b0), (a0+b0)/2 ' last pushed first read } Until Stackitem(1)==Stackitem(2) =Stackitem(1) \\ stack deconstructed at exit of function } Print Agm(1,1/Sqrt(2)) } Checkit