Liking cljdoc? Tell your friends :D

meander.util.delta


case-test-formclj/s

(case-test-form form)

Converts all form into a form suitable for use as a case test. Assumes form is already a literal value.

Converts all `form` into a form suitable for use as a `case`
test. Assumes `form` is already a literal value.
sourceraw docstring

cljs-env?clj/s

(cljs-env? env)

true if compiling ClojureScript or in a ClojureScript setting, false otherwise.

true if compiling ClojureScript or in a ClojureScript setting,
false otherwise.
sourceraw docstring

coll-zipclj/s

(coll-zip root)

Return a zipper with a branch? fn of coll?.

Return a zipper with a branch? fn of coll?.
sourceraw docstring

k-combinationsclj/s

(k-combinations coll k)

All the ways to choose k items from coll.

All the ways to choose k items from coll.
sourceraw docstring

parse-intclj/s

(parse-int s)

Parse the string s as an integer.

Parse the string s as an integer.
sourceraw docstring

partitionsclj/s

(partitions n coll)
(partitions n m coll)

Examples:

(def coll [:a :b])

(partitions 0 coll)) ;; => ([])

(partitions 1 coll) ;; => ([[:a :b]])

(partitions 2 coll) ;; => '([[] [:a :b]] ;; [[:a] [:b]] ;; [[:a :b] []])

(partitions 3 coll) ;; => '([[] [] [:a :b]] ;; [[] [:a] [:b]] ;; [[:a] [] [:b]] ;; [[] [:a :b] []] ;; [[:a] [:b] []] ;; [[:a :b] [] []])

Examples:

(def coll [:a :b])

(partitions 0 coll))
;; => ([])

(partitions 1 coll)
;; => ([[:a :b]])

(partitions 2 coll)
;; => '([[] [:a :b]]
;;      [[:a] [:b]]
;;      [[:a :b] []])

(partitions 3 coll)
;; => '([[] [] [:a :b]]
;;      [[] [:a] [:b]]
;;      [[:a] [] [:b]]
;;      [[] [:a :b] []]
;;      [[:a] [:b] []]
;;      [[:a :b] [] []])
sourceraw docstring

permutationsclj/s

(permutations coll)

Return a sequence of all the ways to arrange coll.

Return a sequence of all the ways to arrange coll.
sourceraw docstring

rankclj/s

(rank xs)

Returns a sorted sequence of values in xs by frequency of occurence.

Returns a sorted sequence of values in xs by frequency of
occurence.
sourceraw docstring

re-matches?clj/s

(re-matches? re s)

Returns true if s matches the regex pattern re, false otherwise.

Returns true if s matches the regex pattern re, false otherwise.
sourceraw docstring

str-partitionsclj/s

(str-partitions n str)

Examples:

(let [str "ab" n 0] (str-partitions n str)) ;; => ([])

(let [str "ab" n 1] (partitions n coll)) ;; => (["ab"])

(let [str "ab" n 2] (partitions n coll)) ;; => ([[] ["ab"] ;; [["a"] ["b"]] ;; [["ab"] []])

(let [str "ab" n 3] (partitions n coll)) ;; => ([[] [] ["ab"]] ;; [[] ["a"] ["b"]] ;; [["a"] [] ["b"]] ;; [[] ["ab"] []] ;; [["a"] ["b"] []] ;; [["ab"] [] []])

Examples:

(let [str "ab"
    n 0]
(str-partitions n str))
;; => ([])

(let [str "ab"
    n 1]
(partitions n coll))
;; => (["ab"])

(let [str "ab"
    n 2]
(partitions n coll))
;; => ([[] ["ab"]
;;     [["a"] ["b"]]
;;     [["ab"] []])

(let [str "ab"
    n 3]
(partitions n coll))
;; => ([[] [] ["ab"]]
;;     [[] ["a"] ["b"]]
;;     [["a"] [] ["b"]]
;;     [[] ["ab"] []]
;;     [["a"] ["b"] []]
;;     [["ab"] [] []])
sourceraw docstring

vsplit-atclj/s

(vsplit-at n v)

Like clojure.core/split-at but for vectors.

Like `clojure.core/split-at` but for vectors.
sourceraw docstring

zip-next-seqclj/s

(zip-next-seq loc)

Given a clojure.zip zipper location loc return a lazy sequence of all clojure.zip/next locations from loc.

Given a clojure.zip zipper location loc return a lazy sequence of
all clojure.zip/next locations from loc.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close