Handbook
Glossary
occurrence-count-by ( seq quot: ( elt -- elt' ) -- hash seq' )
Vocabulary
sequences
.
extras
Inputs
seq
an
object
quot
a
quotation
with stack effect
( elt -- elt' )
Outputs
hash
an
object
seq'
an
object
Definition
USING:
kernel
;
IN:
sequences.extras
:
occurrence-count-by
( seq quot: ( elt -- elt' ) -- hash seq' )
[
[
nip
]
]
dip
[
over
inc-at*
drop
]
compose
compose
[
H{
}
clone
]
2dip
{
}
0accumulate-as
;
inline