Multiple-argument #() syntax.
This commit is contained in:
parent
7e6ac00457
commit
b340cb6ccb
2 changed files with 4 additions and 0 deletions
|
|
@ -13,6 +13,9 @@
|
|||
"Or using even shorter syntax"
|
||||
(= __ (#(* 15 %) __))
|
||||
|
||||
"Short anonymous functions may take multiple arguments"
|
||||
(= __ (#(+ %1 %2 %3) 4 5 6))
|
||||
|
||||
"One function can beget another"
|
||||
(= __ ((fn []
|
||||
((fn [a b] (__ a b))
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
"functions" {"__" [20
|
||||
10 5
|
||||
30 2
|
||||
15
|
||||
20 "*"]
|
||||
"___" ['(fn [f] (f 5))
|
||||
'(fn [f] 25)]}
|
||||
|
|
|
|||
Loading…
Reference in a new issue