Fork me on GitHub
#specter
<
2016-10-01
>
puzzler00:10:58

It seems like pred would also work in the last couple examples where you've recommended selected?. What are some instances where they would behave differently?

nathanmarz13:10:11

well, for pred to work like (selected? (must :a) (must :b)) you would have to write #(and (contains? % :a) (contains? (:a %) :b))

nathanmarz13:10:42

@puzzler selected? is particularly good for things like (selected? (filterer even?) (view count) #(>= % 2)), which stays navigated at current position if the sequence contains at least 2 even numbers

nathanmarz13:10:21

or something like (selected? ALL even?) which stays navigated if at least one even number

puzzler13:10:46

It sounds like, basically, pred takes a Clojure predicate function and selected? takes a navigator path.

nathanmarz14:10:58

@puzzler yes, that's correct