fix comment for putval
This commit is contained in:
parent
224369f4eb
commit
c633e3a80a
1 changed files with 10 additions and 10 deletions
|
|
@ -349,19 +349,19 @@
|
||||||
(compiled-select-one late structure)
|
(compiled-select-one late structure)
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
(defparamscollector
|
||||||
|
^{:doc
|
||||||
|
"Adds an external value to the collected vals. Useful when additional arguments
|
||||||
|
are required to the transform function that would otherwise require partial
|
||||||
|
application or a wrapper function.
|
||||||
|
|
||||||
;;TODO: add this comment:
|
e.g., incrementing val at path [:a :b] by 3:
|
||||||
; "Adds an external value to the collected vals. Useful when additional arguments
|
(transform [:a :b (putval 3)] + some-map)"}
|
||||||
; are required to the transform function that would otherwise require partial
|
putval
|
||||||
; application or a wrapper function.
|
[val]
|
||||||
|
|
||||||
; e.g., incrementing val at path [:a :b] by 3:
|
|
||||||
; (transform [:a :b (putval 3)] + some-map)"
|
|
||||||
(defparamscollector putval [val]
|
|
||||||
(collect-val [this structure]
|
(collect-val [this structure]
|
||||||
val ))
|
val ))
|
||||||
|
|
||||||
;;TODO: test nothing matches case
|
|
||||||
(defn cond-path
|
(defn cond-path
|
||||||
"Takes in alternating cond-path selector cond-path selector...
|
"Takes in alternating cond-path selector cond-path selector...
|
||||||
Tests the structure if selecting with cond-path returns anything.
|
Tests the structure if selecting with cond-path returns anything.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue