tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 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