nths ( indices seq -- seq' )


Vocabulary
sequences

Inputs
indicesa sequence
seqa sequence


Outputs
seq'a sequence


Word description
Outputs a sequence of elements from the input sequence indexed by the indices.

Examples
USING: prettyprint sequences ; { 0 2 } { "a" "b" "c" } nths .
{ "a" "c" }


Definition


: nths ( indices seq -- seq' ) [ [ nth ] curry ] keep map-as ;