]> gitweb.factorcode.org Git - factor.git/commitdiff
match: make-assoc: -1
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 20 Jul 2012 00:35:00 +0000 (17:35 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 20 Jul 2012 00:35:00 +0000 (17:35 -0700)
basis/match/match.factor

index 9125eb6ed0f70811ec03d8235e94eaac35965fb3..f009aa2ccbdbb7d7f62919ba78322c68f030e4da 100644 (file)
@@ -23,7 +23,7 @@ SYNTAX: MATCH-VARS: ! vars ...
     dup word? [ "match-var" word-prop ] [ drop f ] if ;
 
 : set-match-var ( value var -- ? )
-    dup namespace key? [ get = ] [ set t ] if ;
+    building get ?at [ = ] [ ,, t ] if ;
 
 : (match) ( value1 value2 -- matched? )
     {
@@ -40,7 +40,7 @@ SYNTAX: MATCH-VARS: ! vars ...
     } cond ;
 
 : match ( value1 value2 -- bindings )
-    [ (match) ] H{ } make-assoc swap [ drop f ] unless ;
+    [ (match) ] H{ } make swap [ drop f ] unless ;
 
 MACRO: match-cond ( assoc -- )
     <reversed>