Handbook
Glossary
map-concat ( ... seq quot: ( ... elt -- ... newelt ) -- ... newseq )
Vocabulary
sequences
.
extras
Inputs
seq
a
sequence
quot
a
quotation
Outputs
newseq
a
sequence
Word description
Perform a
map
on the given sequence with
quot
, then perform a
concat
on the result.
Definition
USING:
kernel
sequences
;
IN:
sequences.extras
:
map-concat
( ... seq quot: ( ... elt -- ... newelt ) -- ... newseq )
over
empty?
[
2drop
{
}
]
[
[
[
first
]
dip
call
]
2check
[
>resizable
[
[
push-all
]
curry
compose
1
each-from
]
keep
]
keep
like
]
if
;
inline