]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/shuffle/shuffle.factor
combinators.extras: Add some weird combinators that might be useful.
[factor.git] / basis / shuffle / shuffle.factor
index 3c7cc64f38a002510582f9659bb344a4719e9317..393dffc2f611d096deb7f7563db797d58712b18d 100644 (file)
@@ -19,6 +19,12 @@ SYNTAX: shuffle(
 
 : 5roll ( a b c d e -- b c d e a ) [ roll ] dip swap ; inline
 
+: 6roll ( a b c d e f -- b c d e f a ) [ roll ] 2dip rot ; inline
+
+: 7roll ( a b c d e f g -- b c d e f g a ) [ roll ] 3dip roll ; inline
+
+: 8roll ( a b c d e f g h -- b c d e f g h a ) [ roll ] 4dip 5roll ; inline
+
 : 2reach ( w x y z -- w x y z w x ) reach reach ; inline
 
 : nipdd ( w x y z -- x y z ) roll drop ; inline