sequences.extras: adding sift-as and harvest-as.

db4
John Benediktsson 2012-05-31 11:01:16 -07:00
parent d412364483
commit e07b002a50
1 changed files with 6 additions and 0 deletions

View File

@ -189,3 +189,9 @@ PRIVATE>
[ [ length ] [ max ] map-reduce iota ] keep
[ [ ?nth ] with map ] curry map concat sift
] if-empty ;
: sift-as ( seq exemplar -- newseq )
[ ] swap filter-as ;
: harvest-as ( seq exemplar -- newseq )
[ empty? not ] swap filter-as ;