(->Case val-id test-vals jmp-blocks default-block)
Positional factory function for class clojure.core.async.impl.ioc_macros.Case.
Source
(defrecord Case [val-id test-vals jmp-blocks default-block]
IInstruction
(reads-from [this] [val-id])
(writes-to [this] [])
(block-references [this] [])
ITerminator
(terminate-block [this state-sym _]
`(do (case ~val-id
~@(concat (mapcat (fn [test blk]
`[~test (aset-all! ~state-sym
~STATE-IDX ~blk)])
test-vals jmp-blocks)
(when default-block
`[(do (aset-all! ~state-sym ~STATE-IDX ~default-block)
:recur)])))
:recur)))