Handbook
Glossary
collect-index-by! ( ... assoc seq quot: ( ... obj -- ... key ) -- ... assoc )
Vocabulary
assocs
.
extras
Inputs
assoc
an
object
seq
an
object
quot
a
quotation
with stack effect
( ... obj -- ... key )
Outputs
assoc
an
object
Definition
USING:
assocs
kernel
sequences
;
IN:
assocs.extras
:
collect-index-by!
( ... assoc seq quot: ( ... obj -- ... key ) -- ... assoc )
rot
[
[
[
swap
]
compose
]
dip
[
push-at
]
curry
compose
each-index
]
keep
;
inline