Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
6
Task/Named-parameters/PicoLisp/named-parameters-1.l
Normal file
6
Task/Named-parameters/PicoLisp/named-parameters-1.l
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(de foo @
|
||||
(bind (rest) # Bind symbols in CARs to values in CDRs
|
||||
(println 'Bar 'is Bar)
|
||||
(println 'Mumble 'is Mumble) ) )
|
||||
|
||||
(foo '(Bar . 123) '(Mumble . "def"))
|
||||
7
Task/Named-parameters/PicoLisp/named-parameters-2.l
Normal file
7
Task/Named-parameters/PicoLisp/named-parameters-2.l
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(de foo @
|
||||
(bind (next) # Save all symbols in first argument
|
||||
(mapc set (arg) (rest)) # then bind them to remaining arguments
|
||||
(println 'Bar 'is Bar)
|
||||
(println 'Mumble 'is Mumble) ) )
|
||||
|
||||
(foo '(Bar Mumble) 123 "def")
|
||||
Loading…
Add table
Add a link
Reference in a new issue