(count-if coll pred)
Find the count of items in coll that satisfy predicate pred
Find the count of items in coll that satisfy predicate pred
(fmap f m)
Applies the function f to the values of the map m
Applies the function f to the values of the map m
(index-of x coll)
Find the index position of x within coll. Only returns the first match, even when there are multiple matches. Returns nil if x is not found
Find the index position of x within coll. Only returns the first match, even when there are multiple matches. Returns nil if x is not found
(invert-map m)
Swap keys and values for map m. Unlikely to do what you want if there isn't a 1-1 mapping
Swap keys and values for map m. Unlikely to do what you want if there isn't a 1-1 mapping
(kmap f m)
Applies the function f to the keys of the map m
Applies the function f to the keys of the map m
(puzzle-input filename)
Load a puzzle input (from the resources directory in your project) as a seq, with each line in the input as an element in the seq
Load a puzzle input (from the resources directory in your project) as a seq, with each line in the input as an element in the seq
(rotate n coll)
Rotate the collection by n. Positive values of n rotate to the left, meaning that values are taken from the beginning of coll and moved to the end. Negative values of n rotate to the right, meaning values are taken from the end of coll and moved to the front
Rotate the collection by n. Positive values of n rotate to the left, meaning that values are taken from the beginning of coll and moved to the end. Negative values of n rotate to the right, meaning values are taken from the end of coll and moved to the front
(split-at-blankline input)
Splits a seq of lines (e.g. produced by puzzle-input
) into
a collection of chunks, each chunk with a seq of lines
Splits a seq of lines (e.g. produced by `puzzle-input`) into a collection of chunks, each chunk with a seq of lines
(without-keys map keyseq)
Returns a map with only the entries in map whose key isn't in keyseq
Returns a map with only the entries in map whose key isn't in keyseq
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close