Allow empty argmap

This commit is contained in:
Lee Spector 2024-01-12 16:31:46 -05:00
parent 70e9f81f84
commit e6361ec1c0

View File

@ -51,7 +51,7 @@
"Returns a random instruction from a supplied pool of instructions, evaluating
ERC-producing functions to a constant literal."
[instructions argmap]
(case (:closes argmap)
(case (or (:closes argmap) :specified)
:specified (let [instruction (rand-nth instructions)]
(if (fn? instruction)
(instruction)