factor/extra/arrays/lib/lib.factor

11 lines
227 B
Factor
Raw Normal View History

2007-09-20 18:09:08 -04:00
USING: kernel arrays sequences sequences.private macros ;
IN: arrays.lib
MACRO: narray ( n -- quot )
dup [ f <array> ] curry
swap <reversed> [
[ swap [ set-nth-unsafe ] keep ] curry
] map concat append ;