Add some new byte array constructors

db4
Slava Pestov 2008-09-01 18:26:10 -05:00
parent 669e0f8f0a
commit 9ca908e5a9
1 changed files with 8 additions and 0 deletions

View File

@ -19,3 +19,11 @@ M: byte-array resize
resize-byte-array ;
INSTANCE: byte-array sequence
: 1byte-array ( x -- array ) 1 <byte-array> [ set-first ] keep ; inline
: 2byte-array ( x y -- array ) B{ } 2sequence ; inline
: 3byte-array ( x y z -- array ) B{ } 3sequence ; inline
: 4byte-array ( w x y z -- array ) B{ } 4sequence ; inline