]> gitweb.factorcode.org Git - factor.git/commitdiff
remove spin from core and retire it to basis/shuffle
authorJoe Groff <arcata@gmail.com>
Thu, 5 Nov 2009 21:40:48 +0000 (15:40 -0600)
committerJoe Groff <arcata@gmail.com>
Thu, 5 Nov 2009 21:40:48 +0000 (15:40 -0600)
basis/shuffle/shuffle-docs.factor
basis/shuffle/shuffle.factor
core/generic/single/single.factor
core/kernel/kernel.factor

index 15398450a7e63d238a22abe0e6cd0d933d5c731c..ebb87eda7a66c2c3b2a37e9f97fd089c676115d2 100644 (file)
@@ -1,5 +1,6 @@
 USING: help.markup help.syntax ;
 IN: shuffle
 
+HELP: spin  $complex-shuffle ;
 HELP: roll  $complex-shuffle ;
 HELP: -roll $complex-shuffle ;
index 43c0b75be1cd91b38cb90af537a04eeeaee82407..4388aedb3e9d8a68171c0cc797f106fc76feed9a 100644 (file)
@@ -22,6 +22,8 @@ MACRO: shuffle-effect ( effect -- )
 SYNTAX: shuffle(
     ")" parse-effect suffix! \ shuffle-effect suffix! ;
 
+: spin ( x y z -- z y x ) swap rot ; inline deprecated
+
 : roll ( x y z t -- y z t x ) [ rot ] dip swap ; inline deprecated
 
 : -roll ( x y z t -- t x y z ) swap [ -rot ] dip ; inline deprecated
index 1434acf5217e53c4009e24414cdff8eeb7886c9a..5636c336c354d7bdc66ea893f5f6728712827691 100644 (file)
@@ -63,7 +63,7 @@ TUPLE: predicate-engine class methods ;
 
 C: <predicate-engine> predicate-engine
 
-: push-method ( method specializer atomic assoc -- )
+: push-method ( specializer method atomic assoc -- )
     dupd [
         [ ] [ H{ } clone <predicate-engine> ] ?if
         [ methods>> set-at ] keep
@@ -71,7 +71,7 @@ C: <predicate-engine> predicate-engine
 
 : flatten-method ( class method assoc -- )
     [ [ flatten-class keys ] keep ] 2dip [
-        [ spin ] dip push-method
+        [ swap rot ] dip push-method
     ] 3curry each ;
 
 : flatten-methods ( assoc -- assoc' )
index a0934c2b17bcbc2d1201538d8fb62358f233a9dd..bb27f7e57e499983f0f8dbb971a6ed3033a1da96 100644 (file)
@@ -8,8 +8,6 @@ DEFER: 2dip
 DEFER: 3dip
 
 ! Stack stuff
-: spin ( x y z -- z y x ) swap rot ; inline
-
 : 2over ( x y z -- x y z x y ) pick pick ; inline
 
 : clear ( -- ) { } set-datastack ;