remove spin from core and retire it to basis/shuffle
parent
6c48852fb0
commit
6e9d369331
|
|
@ -1,5 +1,6 @@
|
||||||
USING: help.markup help.syntax ;
|
USING: help.markup help.syntax ;
|
||||||
IN: shuffle
|
IN: shuffle
|
||||||
|
|
||||||
|
HELP: spin $complex-shuffle ;
|
||||||
HELP: roll $complex-shuffle ;
|
HELP: roll $complex-shuffle ;
|
||||||
HELP: -roll $complex-shuffle ;
|
HELP: -roll $complex-shuffle ;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@ MACRO: shuffle-effect ( effect -- )
|
||||||
SYNTAX: shuffle(
|
SYNTAX: shuffle(
|
||||||
")" parse-effect suffix! \ shuffle-effect suffix! ;
|
")" 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 -- y z t x ) [ rot ] dip swap ; inline deprecated
|
||||||
|
|
||||||
: -roll ( x y z t -- t x y z ) swap [ -rot ] dip ; inline deprecated
|
: -roll ( x y z t -- t x y z ) swap [ -rot ] dip ; inline deprecated
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ TUPLE: predicate-engine class methods ;
|
||||||
|
|
||||||
C: <predicate-engine> predicate-engine
|
C: <predicate-engine> predicate-engine
|
||||||
|
|
||||||
: push-method ( method specializer atomic assoc -- )
|
: push-method ( specializer method atomic assoc -- )
|
||||||
dupd [
|
dupd [
|
||||||
[ ] [ H{ } clone <predicate-engine> ] ?if
|
[ ] [ H{ } clone <predicate-engine> ] ?if
|
||||||
[ methods>> set-at ] keep
|
[ methods>> set-at ] keep
|
||||||
|
|
@ -71,7 +71,7 @@ C: <predicate-engine> predicate-engine
|
||||||
|
|
||||||
: flatten-method ( class method assoc -- )
|
: flatten-method ( class method assoc -- )
|
||||||
[ [ flatten-class keys ] keep ] 2dip [
|
[ [ flatten-class keys ] keep ] 2dip [
|
||||||
[ spin ] dip push-method
|
[ swap rot ] dip push-method
|
||||||
] 3curry each ;
|
] 3curry each ;
|
||||||
|
|
||||||
: flatten-methods ( assoc -- assoc' )
|
: flatten-methods ( assoc -- assoc' )
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@ DEFER: 2dip
|
||||||
DEFER: 3dip
|
DEFER: 3dip
|
||||||
|
|
||||||
! Stack stuff
|
! Stack stuff
|
||||||
: spin ( x y z -- z y x ) swap rot ; inline
|
|
||||||
|
|
||||||
: 2over ( x y z -- x y z x y ) pick pick ; inline
|
: 2over ( x y z -- x y z x y ) pick pick ; inline
|
||||||
|
|
||||||
: clear ( -- ) { } set-datastack ;
|
: clear ( -- ) { } set-datastack ;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue