Fix formatting.
This commit is contained in:
parent
431dd3ea82
commit
ef9e11aadd
1 changed files with 3 additions and 1 deletions
|
|
@ -183,7 +183,9 @@ Walks code? Let's do this one later.
|
||||||
=> (select [(collect ALL) (collect ALL) ALL] (range 3))
|
=> (select [(collect ALL) (collect ALL) ALL] (range 3))
|
||||||
[[[0 1 2] [0 1 2] 0] [[0 1 2] [0 1 2] 1] [[0 1 2] [0 1 2] 2]]
|
[[[0 1 2] [0 1 2] 0] [[0 1 2] [0 1 2] 1] [[0 1 2] [0 1 2] 2]]
|
||||||
;; Add the sum of the evens to the first element of the seq
|
;; Add the sum of the evens to the first element of the seq
|
||||||
=> (transform [(collect ALL even?) FIRST] (fn [evens first] (reduce + first evens)) (range 5))
|
=> (transform [(collect ALL even?) FIRST]
|
||||||
|
(fn [evens first] (reduce + first evens))
|
||||||
|
(range 5))
|
||||||
(6 1 2 3 4)
|
(6 1 2 3 4)
|
||||||
;; Replace the first element of the seq with the entire seq
|
;; Replace the first element of the seq with the entire seq
|
||||||
=> (transform [(collect ALL) FIRST] (fn [all _] all) (range 3))
|
=> (transform [(collect ALL) FIRST] (fn [all _] all) (range 3))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue