Handbook
Glossary
sequence-case ( assoc -- quot )
Vocabulary
combinators
.
extras
Inputs
assoc
an
object
Outputs
quot
an
object
Definition
USING:
arrays
combinators
kernel
quotations
sequences
sets
;
IN:
combinators.extras
MACRO:
sequence-case
( assoc -- quot )
[
dup
callable?
[
[
first
dup
set?
[
in?
]
[
=
]
?
[
[
~quotation~
]
dip
]
dip
curry
compose
]
[
second
[
[
drop
]
]
dip
compose
]
bi
2array
]
unless
]
map
[
cond
]
curry
;