From 6b8b2dff0107abdcf1d6dad2c985de05911650f0 Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Thu, 17 Jan 2008 23:51:03 -0600 Subject: [PATCH] assocs.lib renaming and typo fix --- extra/assocs/lib/lib.factor | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extra/assocs/lib/lib.factor b/extra/assocs/lib/lib.factor index 0181514ab4..5a277e2d8d 100644 --- a/extra/assocs/lib/lib.factor +++ b/extra/assocs/lib/lib.factor @@ -7,18 +7,18 @@ IN: assocs.lib : >set ( seq -- hash ) [ dup ] H{ } map>assoc ; -: ref-hash ( table key -- value ) swap at ; +: ref-at ( table key -- value ) swap at ; ! set-hash with alternative stack effects -: put-hash* ( table key value -- ) swap rot set-at ; +: put-at* ( table key value -- ) swap rot set-at ; -: put-hash ( table key value -- table ) swap pick set-at ; +: put-at ( table key value -- table ) swap pick set-at ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -: set-hash-stack ( value key seq -- ) - dupd [ key? ] when find-last nip set-at ; +: set-assoc-stack ( value key seq -- ) + dupd [ key? ] with find-last nip set-at ; : at-default ( key assoc -- value/key ) dupd at [ nip ] when* ;