sequences.extras: adding sift-as and harvest-as.
parent
d412364483
commit
e07b002a50
|
@ -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 ;
|
||||
|
|
Loading…
Reference in New Issue