RosettaCodeData/Task/Jensens-Device/M2000-Interpreter/jensens-device-1.m2000
2025-06-11 20:16:52 -04:00

14 lines
385 B
Text

Module Jensen`s_Device {
double i=0
Report Lazy$(1/i) ' display the definition of the lazy function
Function Sum (&i, lo, hi, &f()) {
double temp=0
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