cc.journeyman.the-great-game.utils
TODO: write docs
deep-merge
(deep-merge & maps)Recursively merges maps. Stolen from https://dnaeon.github.io/recursively-merging-maps-in-clojure/
inc-or-one
(inc-or-one val)If this val is a number, return that number incremented by one; otherwise, return 1. TODO: should probably be in utils.
make-target-filter
(make-target-filter targets)Construct a filter which, when applied to a list of maps, will pass those which match these targets, where each target is a tuple key value.
truthy?
(truthy? val)Returns true unless val is nil, false or an empty sequence. Otherwise always ‘false’; never any other value.
value-or-default
(value-or-default m k dflt)Return the value of this key k in this map m, or this dflt value if there is none.