diff --git a/core/assocs/assocs.factor b/core/assocs/assocs.factor index 17eab7f672..748300ef0f 100644 --- a/core/assocs/assocs.factor +++ b/core/assocs/assocs.factor @@ -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? ; diff --git a/core/generic/standard/standard.factor b/core/generic/standard/standard.factor index 300bd44fb4..9ace1a01f4 100644 --- a/core/generic/standard/standard.factor +++ b/core/generic/standard/standard.factor @@ -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 ; diff --git a/core/hashtables/hashtables.factor b/core/hashtables/hashtables.factor index 8663f25a70..9268340c79 100644 --- a/core/hashtables/hashtables.factor +++ b/core/hashtables/hashtables.factor @@ -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 diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index eda8091de9..80b2849f25 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -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>