Some code cleanup only

cvs
Doug Coleman 2005-11-17 09:31:36 +00:00
parent 40d531679a
commit 6adba3fbf0
1 changed files with 2 additions and 6 deletions

View File

@ -37,9 +37,8 @@ USING: errors kernel sequences math sequences-internals namespaces arrays ;
inf -inf rot [ dup pick max -rot nip pick min -rot nip ] each ; inf -inf rot [ dup pick max -rot nip pick min -rot nip ] each ;
: absminmax ( seq -- min max ) : absminmax ( seq -- min max )
#! find the min and max of a seq in one pass #! find the absolute values of the min and max of a seq in one pass
inf -inf rot [ dup pick max -rot nip pick min -rot nip ] each minmax 2dup [ abs ] 2apply > [ swap ] when ;
2dup [ abs ] 2apply > [ swap ] when ;
SYMBOL: almost=-precision .000001 almost=-precision set SYMBOL: almost=-precision .000001 almost=-precision set
: almost= ( a b -- bool ) : almost= ( a b -- bool )
@ -71,9 +70,6 @@ M: frange length ( frange -- n )
: increment-start ( frange -- ) : increment-start ( frange -- )
[ [ frange-from ] keep frange-step + ] keep set-frange-from ; [ [ frange-from ] keep frange-step + ] keep set-frange-from ;
: exclude-last ( frange -- )
;
: frange-range ( frange -- range ) : frange-range ( frange -- range )
[ frange-step ] keep frange-length 1- * ; [ frange-step ] keep frange-length 1- * ;