]> gitweb.factorcode.org Git - factor.git/commitdiff
shuffle: Add 5roll, 2reach, nipdd
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 21 Feb 2022 18:07:34 +0000 (12:07 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 21 Feb 2022 18:07:34 +0000 (12:07 -0600)
basis/shuffle/shuffle.factor

index 78c88dab72592799d429f935932dc89ebc1c03fc..3c7cc64f38a002510582f9659bb344a4719e9317 100644 (file)
@@ -16,3 +16,9 @@ SYNTAX: shuffle(
 : 2swap ( x y z t -- z t x y ) 2 2 mnswap ; inline
 
 : 2pick ( x y z t -- x y z t x y ) reach reach ; inline
+
+: 5roll ( a b c d e -- b c d e a ) [ roll ] dip swap ; 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