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 * ;
: concat-as ( seq exemplar -- newseq )
swap [ { } ] [
[ sum-lengths over new-resizable ] keep
[ append! ] each
] if-empty swap like ;
[
[ dup sum-lengths ] dip new-resizable
[ [ push-all ] curry each ] keep
] keep like ; inline
: concat ( seq -- newseq )
[ { } ] [ dup first concat-as ] if-empty ;