more lint cleanups

db4
Doug Coleman 2008-01-13 08:29:04 -10:00
parent a592f3a37b
commit 376644794c
8 changed files with 11 additions and 14 deletions

View File

@ -43,7 +43,7 @@ M: assoc assoc-find
inline inline
: assoc-push-if ( key value quot accum -- ) : assoc-push-if ( key value quot accum -- )
>r 2over 2slip r> roll >r 2keep r> roll
[ >r 2array r> push ] [ 3drop ] if ; inline [ >r 2array r> push ] [ 3drop ] if ; inline
: assoc-pusher ( quot -- quot' accum ) : assoc-pusher ( quot -- quot' accum )
@ -53,7 +53,7 @@ M: assoc assoc-find
over >r assoc-pusher >r assoc-each r> r> assoc-like ; inline over >r assoc-pusher >r assoc-each r> r> assoc-like ; inline
: assoc-all? ( assoc quot -- ? ) : assoc-all? ( assoc quot -- ? )
[ not ] compose assoc-find 2nip not ; inline [ not ] compose assoc-contains? not ; inline
: assoc-contains? ( assoc quot -- ? ) : assoc-contains? ( assoc quot -- ? )
assoc-find 2nip ; inline assoc-find 2nip ; inline

View File

@ -32,7 +32,7 @@ PRIVATE>
: stop ( -- ) : stop ( -- )
walker-hook [ walker-hook [
f swap continue-with continue
] [ ] [
run-queue pop-back dup array? run-queue pop-back dup array?
[ first2 continue-with ] [ continue ] if [ first2 continue-with ] [ continue ] if

View File

@ -102,7 +102,7 @@ M: vocab-link vocab-name vocab-link-name ;
UNION: vocab-spec vocab vocab-link ; UNION: vocab-spec vocab vocab-link ;
: forget-vocab ( vocab -- ) : forget-vocab ( vocab -- )
dup vocab-words values forget-all dup words forget-all
vocab-name dictionary get delete-at ; vocab-name dictionary get delete-at ;
M: vocab-spec forget* forget-vocab ; M: vocab-spec forget* forget-vocab ;

View File

@ -96,12 +96,12 @@ SYMBOL: m
: zero-dt ( -- <dt> ) 0 0 0 0 0 0 <dt> ; : zero-dt ( -- <dt> ) 0 0 0 0 0 0 <dt> ;
: years ( n -- dt ) zero-dt [ set-dt-year ] keep ; : years ( n -- dt ) zero-dt [ set-dt-year ] keep ;
: months ( n -- dt ) zero-dt [ set-dt-month ] keep ; : months ( n -- dt ) zero-dt [ set-dt-month ] keep ;
: weeks ( n -- dt ) 7 * zero-dt [ set-dt-day ] keep ;
: days ( n -- dt ) zero-dt [ set-dt-day ] keep ; : days ( n -- dt ) zero-dt [ set-dt-day ] keep ;
: weeks ( n -- dt ) 7 * days ;
: hours ( n -- dt ) zero-dt [ set-dt-hour ] keep ; : hours ( n -- dt ) zero-dt [ set-dt-hour ] keep ;
: minutes ( n -- dt ) zero-dt [ set-dt-minute ] keep ; : minutes ( n -- dt ) zero-dt [ set-dt-minute ] keep ;
: seconds ( n -- dt ) zero-dt [ set-dt-second ] keep ; : seconds ( n -- dt ) zero-dt [ set-dt-second ] keep ;
: milliseconds ( n -- dt ) 1000 /f zero-dt [ set-dt-second ] keep ; : milliseconds ( n -- dt ) 1000 /f seconds ;
: julian-day-number>timestamp ( n -- timestamp ) : julian-day-number>timestamp ( n -- timestamp )
julian-day-number>date 0 0 0 0 <timestamp> ; julian-day-number>date 0 0 0 0 <timestamp> ;
@ -259,10 +259,7 @@ M: timestamp <=> ( ts1 ts2 -- n )
1+ + 7 mod ; 1+ + 7 mod ;
: day-of-week ( timestamp -- n ) : day-of-week ( timestamp -- n )
[ timestamp-year ] keep >date< zeller-congruence ;
[ timestamp-month ] keep
timestamp-day
zeller-congruence ;
: day-of-year ( timestamp -- n ) : day-of-year ( timestamp -- n )
[ [

View File

@ -40,7 +40,7 @@ SYMBOL: big-endian?
] "" make 64 group ; ] "" make 64 group ;
: shift-mod ( n s w -- n ) : shift-mod ( n s w -- n )
>r shift r> 1 swap shift 1 - bitand ; inline >r shift r> 2^ 1- bitand ; inline
: update-old-new ( old new -- ) : update-old-new ( old new -- )
[ get >r get r> ] 2keep >r >r w+ dup r> set r> set ; inline [ get >r get r> ] 2keep >r >r w+ dup r> set r> set ; inline

View File

@ -29,7 +29,7 @@ IN: http.client
: crlf "\r\n" write ; : crlf "\r\n" write ;
: http-request ( host resource method -- ) : http-request ( host resource method -- )
write " " write write " HTTP/1.0" write crlf write bl write " HTTP/1.0" write crlf
"Host: " write write crlf ; "Host: " write write crlf ;
: get-request ( host resource -- ) : get-request ( host resource -- )

View File

@ -77,7 +77,7 @@ TUPLE: miller-rabin-bounds ;
>odd (find-relative-prime) ; >odd (find-relative-prime) ;
: find-relative-prime ( n -- p ) : find-relative-prime ( n -- p )
dup random >odd (find-relative-prime) ; dup random (find-relative-prime*) ;
: unique-primes ( numbits n -- seq ) : unique-primes ( numbits n -- seq )
#! generate two primes #! generate two primes