From 2a1fbb33962fd28eafce3200f2f48ec1d1d18124 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 14 Sep 2012 09:19:26 -0700 Subject: [PATCH] math.order: make it more obvious this is a real<=>. --- core/math/order/order.factor | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/math/order/order.factor b/core/math/order/order.factor index 702c54376b..b39b81ba2f 100644 --- a/core/math/order/order.factor +++ b/core/math/order/order.factor @@ -17,20 +17,20 @@ GENERIC: <=> ( obj1 obj2 -- <=> ) ) ( x y -- ? ) +: (real<=>) ( x y -- ? ) 2dup < [ 2drop +lt+ ] [ number= +eq+ +gt+ ? ] if ; inline -MATH: number<=> ( x y -- ? ) -M: fixnum number<=> { fixnum fixnum } declare (number<=>) ; inline -M: bignum number<=> { bignum bignum } declare (number<=>) ; inline -M: float number<=> { float float } declare (number<=>) ; inline -M: real number<=> (number<=>) ; inline +MATH: real<=> ( x y -- ? ) +M: fixnum real<=> { fixnum fixnum } declare (real<=>) ; inline +M: bignum real<=> { bignum bignum } declare (real<=>) ; inline +M: float real<=> { float float } declare (real<=>) ; inline +M: real real<=> (real<=>) ; inline PRIVATE> -M: real <=> number<=> ; inline +M: real <=> real<=> ; inline GENERIC: before? ( obj1 obj2 -- ? ) GENERIC: after? ( obj1 obj2 -- ? )