]> gitweb.factorcode.org Git - factor.git/blob - basis/shuffle/shuffle.factor
Create basis vocab root
[factor.git] / basis / shuffle / shuffle.factor
1 ! Copyright (C) 2007 Chris Double, Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel generalizations ;
4
5 IN: shuffle
6
7 : 2swap ( x y z t -- z t x y ) rot >r rot r> ; inline
8
9 : nipd ( a b c -- b c ) rot drop ; inline
10
11 : 3nip ( a b c d -- d ) 3 nnip ; inline
12
13 : 4nip ( a b c d e -- e ) 4 nnip ; inline
14
15 : 4dup ( a b c d -- a b c d a b c d ) 4 ndup ; inline
16
17 : 4drop ( a b c d -- ) 3drop drop ; inline
18
19 : tuckd ( x y z -- z x y z ) 2 ntuck ; inline