Merge branch 'master' of git://factorcode.org/git/factor

db4
unknown 2008-12-15 21:23:36 -06:00
commit d93384bbcd
4 changed files with 7 additions and 7 deletions

View File

@ -90,7 +90,7 @@ M: assoc assoc-clone-like ( assoc exemplar -- newassoc )
] if ; inline recursive
: assoc-stack ( key seq -- value )
dup length 1- swap (assoc-stack) ; flushable
[ length 1- ] keep (assoc-stack) ; flushable
: assoc-subset? ( assoc1 assoc2 -- ? )
[ swapd at* [ = ] [ 2drop f ] if ] curry assoc-all? ;

View File

@ -33,7 +33,7 @@ ERROR: no-method object generic ;
] change-at ;
: flatten-method ( class method assoc -- )
[ dup flatten-class keys swap ] 2dip [
[ [ flatten-class keys ] keep ] 2dip [
[ spin ] dip push-method
] 3curry each ;

View File

@ -77,7 +77,7 @@ TUPLE: hashtable
[ deleted>> 10 fixnum*fast ] [ count>> ] bi fixnum> ; inline
: grow-hash ( hash -- )
[ dup >alist swap assoc-size 1+ ] keep
[ [ >alist ] [ assoc-size 1+ ] bi ] keep
[ reset-hash ] keep
swap (rehash) ; inline

View File

@ -331,7 +331,7 @@ PRIVATE>
<PRIVATE
: (each) ( seq quot -- n quot' )
[ dup length swap [ nth-unsafe ] curry ] dip compose ; inline
[ [ length ] keep [ nth-unsafe ] curry ] dip compose ; inline
: (collect) ( quot into -- quot' )
[ [ keep ] dip set-nth-unsafe ] 2curry ; inline
@ -453,10 +453,10 @@ PRIVATE>
over [ 2pusher [ each ] 2dip ] dip tuck [ like ] 2bi@ ; inline
: monotonic? ( seq quot -- ? )
[ dup length 1- swap ] dip (monotonic) all? ; inline
[ [ length 1- ] keep ] dip (monotonic) all? ; inline
: interleave ( seq between quot -- )
[ (interleave) ] 2curry [ dup length swap ] dip 2each ; inline
[ (interleave) ] 2curry [ [ length ] keep ] dip 2each ; inline
: accumulator ( quot -- quot' vec )
V{ } clone [ [ push ] curry compose ] keep ; inline
@ -679,7 +679,7 @@ PRIVATE>
<PRIVATE
: joined-length ( seq glue -- n )
[ dup sum-lengths swap length 1 [-] ] dip length * + ;
[ [ sum-lengths ] [ length 1 [-] ] bi ] dip length * + ;
PRIVATE>