September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,3 @@
(defn addN [n]
(fn [x]
(+ x n)))

View file

@ -0,0 +1,6 @@
=> (setv add2 (addN 2))
=> (add2 7)
9
=> ((addN 3) 4)
7

View file

@ -0,0 +1,13 @@
procedure main(A)
add2 := addN(2)
write("add2(7) = ",add2(7))
write("add2(1) = ",add2(1))
end
procedure addN(n)
return makeProc{ repeat { (x := (x@&source)[1], x +:= n) } }
end
procedure makeProc(A)
return (@A[1], A[1])
end