nths ( indices seq -- seq' )


Vocabulary
sequences

Inputs and outputs
indicesa sequence
seqa sequence
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 ;