Liking cljdoc? Tell your friends :D

advent-utils.core


count-ifclj

(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
sourceraw docstring

fmapclj

(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
sourceraw docstring

index-ofclj

(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
sourceraw docstring

invert-mapclj

(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
sourceraw docstring

kmapclj

(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
sourceraw docstring

puzzle-inputclj

(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
sourceraw docstring

rotateclj

(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
sourceraw docstring

split-at-blanklineclj

(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
sourceraw docstring

without-keysclj

(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
sourceraw docstring

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

× close