Handbook
Glossary
count-head ( seq quot -- n )
Vocabulary
sequences
.
extras
Inputs
seq
a
sequence
quot
a
quotation
Outputs
n
an
integer
Word description
Count the number of values at the beginning of
seq
that return a truthy value when passed into
quot
.
Definition
USING:
kernel
sequences
;
IN:
sequences.extras
:
count-head
( seq quot -- n )
[
not
]
compose
[
find
drop
]
keepd
length
or
;
inline