Common fns required across brew-bot
Common fns required across brew-bot
(join-ingredient-maps ingredient-bill ingredient-source added-key)
Given an ingredient map, lookup the source ingredient and combine it with the added-key
Given an ingredient map, lookup the source ingredient and combine it with the added-key
(rand-key m)
Pick a random key from a map, weighted by the :probability key of the value
Pick a random key from a map, weighted by the :probability key of the value
(scale-ingredients ingredient-map weight-limit)
Update ingredient-map
so the combined :weights are randomly scaled up to weight-limit
Update `ingredient-map` so the combined :weights are randomly scaled up to `weight-limit`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close