This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-15
Channels
- # aws-lambda (3)
- # beginners (17)
- # boot (65)
- # cider (3)
- # cljs-dev (7)
- # cljsrn (82)
- # clojure (82)
- # clojure-italy (1)
- # clojure-russia (25)
- # clojure-spec (56)
- # clojure-uk (5)
- # clojurescript (52)
- # css (2)
- # datomic (6)
- # emacs (1)
- # hoplon (9)
- # jobs-discuss (5)
- # leiningen (8)
- # mount (2)
- # nginx (1)
- # off-topic (2)
- # om (1)
- # om-next (9)
- # perun (13)
- # portland-or (1)
- # re-frame (13)
- # reagent (20)
- # remote-jobs (2)
- # ring (5)
- # spacemacs (1)
- # specter (10)
- # untangled (5)
- # yada (6)
qqq this seems to work:
(def DeepKeys
(recursive-path [] p
(if-path (must :children)
[:children ALL p]
[:node :key])))
@qqq you can replace (must :children)
with [:children FIRST]
@nathanmarz : I found that #(not-empty (:children %)) also worked
is the main disaadvantage t omy appraoch lack of optimizability since the funciton is 'opaque' ?
the function approach might be a little faster
you'd have to profile it
the recursive approach is very neat