Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/First-class-functions/PicoLisp/first-class-functions.l
Normal file
17
Task/First-class-functions/PicoLisp/first-class-functions.l
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(load "@lib/math.l")
|
||||
|
||||
(de compose (F G)
|
||||
(curry (F G) (X)
|
||||
(F (G X)) ) )
|
||||
|
||||
(de cube (X)
|
||||
(pow X 3.0) )
|
||||
|
||||
(de cubeRoot (X)
|
||||
(pow X 0.3333333) )
|
||||
|
||||
(mapc
|
||||
'((Fun Inv)
|
||||
(prinl (format ((compose Inv Fun) 0.5) *Scl)) )
|
||||
'(sin cos cube)
|
||||
'(asin acos cubeRoot) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue