Improve formatting.

This commit is contained in:
Chris O'Donnell 2016-06-14 16:54:30 -04:00
parent 6cb2dfceb4
commit 066f96d1f9

View file

@ -151,14 +151,13 @@ Binds the passed in seq of paths to `paths-binding`, which can be used in `selec
The implementation of `multi-path` is a nice example of the use of `variable-pathed-nav`.
```clojure
=> (defpathedfn multi-path
[& paths]
(defpathedfn multi-path [& paths]
(variable-pathed-nav [compiled-paths paths]
(select* [this structure next-fn]
(->> compiled-paths
;; seq with the results of navigating each passed in path
(mapcat #(compiled-select % structure))
;; pass each result to the following navigator
;; pass each result to the next navigator
(mapcat next-fn)
doall))
(transform* [this structure next-fn]
@ -219,9 +218,7 @@ Binds the passed in path to `name`.
The implementation of `collect` is a good example of how `pathed-collector` can be used.
```clojure
=> (defpathedfn
collect
[& path]
(defpathedfn collect [& path]
(pathed-collector [late path]
(collect-val [this structure]
(compiled-select late structure))))