(attach-score score-fn specimen)
Attaches the score to a specimen.
Attaches the score to a specimen.
(avg coll)
(clamp x lower upper)
Clamps a value to boundaries.
Clamps a value to boundaries.
(clamp-f f lower upper)
Modifies a function to clamp the result.
Modifies a function to clamp the result.
(distance x y)
Distance between two numbers.
Distance between two numbers.
(dot x y)
(dppr x)
Pretty-prints something and returns it.
Pretty-prints something and returns it.
(evolution base mutator score-fn gen-size)
Generator for generations.
Generator for generations.
Lazy generator of the fibonacci sequence. Probably not the fastest implementation.
Lazy generator of the fibonacci sequence. Probably not the fastest implementation.
(find-index elm coll)
(generation base mutator score-fn gen-size)
Picks out the best one from a generation.
Picks out the best one from a generation.
(in? coll element)
True if coll contains element.
Contrary to contains?
, this works for lists.
True if coll contains element. Contrary to `contains?`, this works for lists.
(insert-at elm idx coll)
Inserts elm into coll at idx, overwriting whatever was there before.
Inserts elm into coll at idx, overwriting whatever was there before.
(insert-in elm idx coll)
Inserts elm into coll at idx, overwriting whatever was there before.
Inserts elm into coll at idx, overwriting whatever was there before.
(monte-carlo sample-fn eval-fn sample-size)
Find a result via Monte Carlo approximation.
Find a result via Monte Carlo approximation.
(mutate base mutator)
Generator that mutates a base, the first element being the base.
Generator that mutates a base, the first element being the base.
(prime-factors n)
Finds all prime factors of n.
Finds all prime factors of n.
(sdiv x y)
(transpose coll)
(transpose acc coll)
Transpose a two-dimensional vector.
Transpose a two-dimensional vector.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close