vectors: small speedup to ``f ?push`` and inline 1vector.

db4
John Benediktsson 2014-05-12 09:07:19 -07:00
parent 25ff85331c
commit 307b700acc
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ M: sequence new-resizable drop <vector> ; inline
INSTANCE: vector growable
: 1vector ( x -- vector ) V{ } 1sequence ;
: 1vector ( x -- vector ) 1array 1 vector boa ; inline
: ?push ( elt seq/f -- seq )
[ 1 <vector> ] unless* [ push ] keep ;
[ [ push ] keep ] [ 1vector ] if* ;