From 6e9d3693312065568bdebe2c9d4cca58fe683cc6 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Thu, 5 Nov 2009 15:40:48 -0600 Subject: [PATCH] remove spin from core and retire it to basis/shuffle --- basis/shuffle/shuffle-docs.factor | 1 + basis/shuffle/shuffle.factor | 2 ++ core/generic/single/single.factor | 4 ++-- core/kernel/kernel.factor | 2 -- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/basis/shuffle/shuffle-docs.factor b/basis/shuffle/shuffle-docs.factor index 15398450a7..ebb87eda7a 100644 --- a/basis/shuffle/shuffle-docs.factor +++ b/basis/shuffle/shuffle-docs.factor @@ -1,5 +1,6 @@ USING: help.markup help.syntax ; IN: shuffle +HELP: spin $complex-shuffle ; HELP: roll $complex-shuffle ; HELP: -roll $complex-shuffle ; diff --git a/basis/shuffle/shuffle.factor b/basis/shuffle/shuffle.factor index 43c0b75be1..4388aedb3e 100644 --- a/basis/shuffle/shuffle.factor +++ b/basis/shuffle/shuffle.factor @@ -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 diff --git a/core/generic/single/single.factor b/core/generic/single/single.factor index 1434acf521..5636c336c3 100644 --- a/core/generic/single/single.factor +++ b/core/generic/single/single.factor @@ -63,7 +63,7 @@ TUPLE: predicate-engine class methods ; C: predicate-engine -: push-method ( method specializer atomic assoc -- ) +: push-method ( specializer method atomic assoc -- ) dupd [ [ ] [ H{ } clone ] ?if [ methods>> set-at ] keep @@ -71,7 +71,7 @@ C: 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' ) diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index a0934c2b17..bb27f7e57e 100644 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -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 ; -- 2.34.1