cc.journeyman.the-great-game.utils

TODO: write docs

cyclic?

(cyclic? route)

True if two or more elements of route are identical

deep-merge

(deep-merge & maps)

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.