sequences: make concat-as inline and don't special-case empty.

db4
John Benediktsson 2015-06-06 09:24:56 -07:00
parent fa2bf33659
commit d07564532d
1 changed files with 4 additions and 4 deletions

View File

@ -840,10 +840,10 @@ M: repetition sum-lengths
[ len>> ] [ elt>> length ] bi * ; [ len>> ] [ elt>> length ] bi * ;
: concat-as ( seq exemplar -- newseq ) : concat-as ( seq exemplar -- newseq )
swap [ { } ] [ [
[ sum-lengths over new-resizable ] keep [ dup sum-lengths ] dip new-resizable
[ append! ] each [ [ push-all ] curry each ] keep
] if-empty swap like ; ] keep like ; inline
: concat ( seq -- newseq ) : concat ( seq -- newseq )
[ { } ] [ dup first concat-as ] if-empty ; [ { } ] [ dup first concat-as ] if-empty ;