Handbook
Glossary
if-assoc-empty ( ..a assoc quot1: ( ..a -- ..b ) quot2: ( ..a assoc -- ..b ) -- ..b )
Vocabulary
assocs
.
extras
Inputs
assoc
an
object
quot1
a
quotation
with stack effect
( ..a -- ..b )
quot2
a
quotation
with stack effect
( ..a assoc -- ..b )
Outputs
None
Definition
USING:
assocs
kernel
;
IN:
assocs.extras
:
if-assoc-empty
( ..a assoc quot1: ( ..a -- ..b ) quot2: ( ..a assoc -- ..b ) -- ..b )
[
dup
assoc-empty?
]
[
[
drop
]
prepose
]
[
]
tri*
if
;
inline