Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,5 @@
func apply(fun, x) { y => fun(x, y) }
func sum(x, y) { x + y }
let sum2 = apply(sum, 2)

View file

@ -0,0 +1,7 @@
func sum(x, y) { x + y }
func doubleMe(x) { x + x }
var arr = []
arr.Add(sum)
arr.Add(doubleMe)
arr.Add(arr.ToString)

View file

@ -0,0 +1,7 @@
func Iterator.Filter(pred) {
for x in this when pred(x) {
yield x
}
}
[1,2,3,4,5].Iterate().Filter(x => x % 2 == 0)

View file

@ -0,0 +1,3 @@
func flip(fun, x, y) {
(y, x) => fun(x, y)
}