RosettaCodeData/Task/Jensens-Device/M2000-Interpreter/jensens-device-1.m2000
2023-07-01 13:44:08 -04:00

14 lines
389 B
Text

Module Jensen`s_Device {
Def double i
Report Lazy$(1/i) ' display the definition of the lazy function
Function Sum (&i, lo, hi, &f()) {
def double temp
For i= lo to hi {
temp+=f()
}
=temp
}
Print Sum(&i, 1, 100, Lazy$(1/i))==5.1873775176392 ' true
Print i=101 ' true
}
Jensen`s_Device