Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
def pa(f, args1) {
|
||||
return def partial {
|
||||
match [`run`, args2] {
|
||||
E.call(f, "run", args1 + args2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def fs(f, s) {
|
||||
var r := []
|
||||
for n in s {
|
||||
r with= f(n)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
def f1(n) { return n * 2 }
|
||||
def f2(n) { return n ** 2 }
|
||||
|
||||
def fsf1 := pa(fs, [f1])
|
||||
def fsf2 := pa(fs, [f2])
|
||||
for s in [0..3, [2, 4, 6, 8]] {
|
||||
for f in [fsf1, fsf2] {
|
||||
println(f(s))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue