remove spin from core and retire it to basis/shuffle

db4
Joe Groff 2009-11-05 15:40:48 -06:00
parent 6c48852fb0
commit 6e9d369331
4 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
USING: help.markup help.syntax ;
IN: shuffle
HELP: spin $complex-shuffle ;
HELP: roll $complex-shuffle ;
HELP: -roll $complex-shuffle ;

View 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

View 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' )

View 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 ;