September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,24 @@
|
|||
function fs(integer rid, sequence s)
|
||||
for i=1 to length(s) do
|
||||
s[i] = call_func(rid,{s[i]})
|
||||
end for
|
||||
return s
|
||||
end function
|
||||
|
||||
function p_apply(sequence f, sequence args)
|
||||
return call_func(f[1],{f[2],args})
|
||||
end function
|
||||
|
||||
function f1(integer i)
|
||||
return i+i
|
||||
end function
|
||||
|
||||
function f2(integer i)
|
||||
return i*i
|
||||
end function
|
||||
|
||||
constant fsf1 = {routine_id("fs"),routine_id("f1")},
|
||||
fsf2 = {routine_id("fs"),routine_id("f2")}
|
||||
|
||||
?p_apply(fsf1,{0,1,2,3})
|
||||
?p_apply(fsf2,{2,4,6,8})
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
function p_apply(sequence ffsa, sequence extra_args)
|
||||
object {fa,fx,set_args} = ffsa
|
||||
return call_func(fa,{fx,set_args&extra_args})
|
||||
end function
|
||||
Loading…
Add table
Add a link
Reference in a new issue