Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,45 @@
|
|||
Module Generator {
|
||||
PowGen = Lambda (e)
|
||||
-> {
|
||||
= Lambda
|
||||
i=0, // closure
|
||||
e // closure
|
||||
-> {
|
||||
i++
|
||||
= i**e
|
||||
}
|
||||
}
|
||||
Squares=Lambda
|
||||
PowGen=PowGen(2) // closure
|
||||
->{
|
||||
= PowGen()
|
||||
}
|
||||
Cubes=Lambda
|
||||
PowGen=PowGen(3) // closure
|
||||
-> {
|
||||
= PowGen()
|
||||
}
|
||||
Filter=Lambda
|
||||
z=Squares(), // closure
|
||||
Squares, // closure
|
||||
m, // closure
|
||||
Cubes // closure
|
||||
->{
|
||||
while m<z :m=cubes():end while
|
||||
if z=m then z=Squares()
|
||||
= z : z=Squares()
|
||||
}
|
||||
For i=1 to 20 : dropit=Filter() :Next i
|
||||
Document doc$="Non-cubic squares (21st to 30th)"
|
||||
Print doc$
|
||||
doc$={
|
||||
} \\ a new line to doc$
|
||||
For i=1 to 10
|
||||
f=Filter()
|
||||
Print Format$("I: {0::-2}, F: {1}",i+20, f)
|
||||
doc$=Format$("I: {0::-2}, F: {1}",i+20, f)+{
|
||||
}
|
||||
Next
|
||||
Clipboard doc$
|
||||
}
|
||||
Generator
|
||||
Loading…
Add table
Add a link
Reference in a new issue