]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/match/match.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / match / match.factor
index 36af5c990a0417b8adc9a1f11f68d62328acb11e..dbc42f53e3f0c40b77f7e77973ea2b5e100cf746 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 !
 ! Based on pattern matching code from Paul Graham's book 'On Lisp'.
-USING: parser kernel words namespaces sequences tuples
+USING: parser kernel words namespaces sequences classes.tuple
 combinators macros assocs math ;
 IN: match
 
@@ -32,10 +32,10 @@ SYMBOL: _
         { [ 2dup = ] [ 2drop t ] }
         { [ 2dup [ _ eq? ] either? ] [ 2drop t ] }
         { [ 2dup [ sequence? ] both? ] [
-            2dup [ length ] 2apply =
+            2dup [ length ] bi@ =
             [ [ (match) ] 2all? ] [ 2drop f ] if ] }
         { [ 2dup [ tuple? ] both? ]
-          [ [ tuple>array ] 2apply [ (match) ] 2all? ] }
+          [ [ tuple>array ] bi@ [ (match) ] 2all? ] }
         { [ t ] [ 2drop f ] }
     } cond ;