diff --git a/core/hashtables/hashtables.factor b/core/hashtables/hashtables.factor index 7d8c6f0b5f..1fabc1aab7 100755 --- a/core/hashtables/hashtables.factor +++ b/core/hashtables/hashtables.factor @@ -95,11 +95,12 @@ IN: hashtables [ swap pick (set-hash) drop f ] find-pair 2drop 2drop ; : hash-large? ( hash -- ? ) - dup hash-count 3 fixnum*fast - swap hash-array array-capacity > ; + [ hash-count 3 fixnum*fast ] + [ hash-array array-capacity ] bi > ; : hash-stale? ( hash -- ? ) - dup hash-deleted 10 fixnum*fast swap hash-count fixnum> ; + [ hash-deleted 10 fixnum*fast ] + [ hash-count ] bi fixnum> ; : grow-hash ( hash -- ) [ dup hash-array swap assoc-size 1+ ] keep @@ -183,10 +184,13 @@ M: hashtable assoc-like [ 3drop ] [ dupd dupd set-at swap push ] if ; inline : prune ( seq -- newseq ) - dup length over length - rot [ >r 2dup r> (prune) ] each nip ; + [ length ] + [ length ] + [ ] tri + [ >r 2dup r> (prune) ] each nip ; : all-unique? ( seq -- ? ) - dup prune [ length ] 2apply = ; + [ length ] + [ prune length ] bi = ; INSTANCE: hashtable assoc