mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Fix the as-> macro exemple (#4054)
This commit is contained in:
parent
c351cab657
commit
13991f615a
@ -298,8 +298,8 @@ keymap ; => {:a 1, :b 2, :c 3}
|
|||||||
(as-> [1 2 3] input
|
(as-> [1 2 3] input
|
||||||
(map inc input);=> You can use last transform's output at the last position
|
(map inc input);=> You can use last transform's output at the last position
|
||||||
(nth input 2) ;=> and at the second position, in the same expression
|
(nth input 2) ;=> and at the second position, in the same expression
|
||||||
(conj [4 5 6] input [8 9 10])) ;=> or in the middle !
|
(conj [4 5 6] input 8 9 10)) ;=> or in the middle !
|
||||||
|
; Result: [4 5 6 4 8 9 10]
|
||||||
|
|
||||||
|
|
||||||
; Modules
|
; Modules
|
||||||
|
Loading…
Reference in New Issue
Block a user