(any x)returns true for any value (any nil) => true (any '_) => true
returns true for any value (any nil) => true (any '_) => true
(cursor? ele)checks if element is |
(cursor? '|) => true
(cursor? '_) => false
checks if element is `|` (cursor? '|) => true (cursor? '_) => false
(deletion? ele)checks if element has a delete meta (deletion? '^:- a) => true (deletion? 'a) => false
checks if element has a delete meta (deletion? '^:- a) => true (deletion? 'a) => false
(expand-meta ele)separates out the meta into individual flags
(meta (expand-meta ^:? ())) => {:? true}
(meta (expand-meta ^:+%? ())) => {:+ true, :? true, :% true}
separates out the meta into individual flags
(meta (expand-meta ^:? ()))
=> {:? true}
(meta (expand-meta ^:+%? ()))
=> {:+ true, :? true, :% true}(find-index pred seq)(find-index pred [x & more :as seq] idx)returns the index of the first occurrence (find-index #{2} '(1 2 3 4)) => 1
returns the index of the first occurrence
(find-index #{2} '(1 2 3 4))
=> 1(finto to from)into but the right way for lists (finto () '(1 2 3)) => '(1 2 3)
into but the right way for lists (finto () '(1 2 3)) => '(1 2 3)
(insertion? ele)checks if element has an insert meta (insertion? '^:+ a) => true (insertion? 'a) => false
checks if element has an insert meta (insertion? '^:+ a) => true (insertion? 'a) => false
(none x)returns false for any value (none nil) => false (none '_) => false
returns false for any value (none nil) => false (none '_) => false
(prepare-deletion pattern)removes extraneous symbols for deletion walk (prepare-deletion '(+ a 2)) => '(+ a 2)
(prepare-deletion '(+ ^:+ a | 2)) => '(+ 2)
removes extraneous symbols for deletion walk (prepare-deletion '(+ a 2)) => '(+ a 2) (prepare-deletion '(+ ^:+ a | 2)) => '(+ 2)
(prepare-insertion pattern)removes extraneous symbols for deletion walk (prepare-insertion '(+ a 2)) => '(+ a 2)
(prepare-insertion '(+ ^:+ a | ^:- b 2)) => '(+ a 2)
removes extraneous symbols for deletion walk (prepare-insertion '(+ a 2)) => '(+ a 2) (prepare-insertion '(+ ^:+ a | ^:- b 2)) => '(+ a 2)
(prepare-query pattern)removes extraneous symbols for query walk
(prepare-query '(+ ^:+ a | ^:- b 2)) => '(+ 2)
removes extraneous symbols for query walk (prepare-query '(+ ^:+ a | ^:- b 2)) => '(+ 2)
(prewalk f form)helper function for changing elements eagerly
helper function for changing elements eagerly
(remove-items pred pattern)removes items from a form matching the predicate (remove-items #{1} '(1 2 3 4)) => '(2 3 4)
(remove-items #{1} '(1 (1 (1 (1))))) => '(((())))
removes items from a form matching the predicate
(remove-items #{1} '(1 2 3 4))
=> '(2 3 4)
(remove-items #{1} '(1 (1 (1 (1)))))
=> '(((())))cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |