14 lines
389 B
Text
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
|