Author: | sconcrete |
---|---|
Mode: | factor |
Date: | Tue, 20 Jan 2009 20:04:31 |
! Create a subsequence from 'seq' by only selecting elements ! whose index is in 'indices'. : pick-indices ( seq indices -- subseq ) [ [ [ swap nth , ] curry ] map cleave ] { } make ;
Author: | me |
---|---|
Mode: | factor |
Date: | Tue, 20 Jan 2009 21:20:00 |
sequences:nths: USING: kernel ; IN: sequences : nths ( indices seq -- seq' ) [ nth ] curry map ;