4 ms·
One problem with using or is if the key is associated with false, then it will be ignored in favour of the default. Keywords support a second argument which is
by lkitching 8y ago
One problem with using or is if the key is associated with false, then it will be ignored in favour of the default. Keywords support a second argument which is the default to use on not-found so you can just write:
(-> {:a 1 :b 2}
(:c 5.5)
inc)