Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,26 @@
a=(1,2,3,4,5)
b=lambda->{
push number**2
}
Print a#map(b) ' 1 4 9 16 25
Print a#map(b, b) ' 1 16 81 256 625
b=lambda (z) ->{
=lambda z ->{
push number**z
}
}
Print a#map(b(2)) ' 1 4 9 16 25
Print a#map(b(3)) ' 1 8 27 64 125
\\ second example
a=(1,2,3,4,5)
class s {sum=0}
\\ s is a pointer to an instance of s()
s->s()
c=lambda s -> {
push number+number
s=>sum=stackitem() ' peek the value from stack
}
\\ c passed by value to fold(), but has a pointer to s
Print a#fold(c, 100)=115
Print s=>sum=115