1 ! Copyright (C) 2006 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test match namespaces arrays ;
8 [ H{ { ?a 1 } { ?b 2 } } ] [
9 { ?a ?b } { 1 2 } match
15 { { ?a ?b } [ ?a ?b 2array ] }
49 1 2 <foo> T{ foo f ?a ?b } match [
55 1 2 <foo> \ ?a \ ?b <foo> match [
73 { "a" 1 2 "b" } { _ ?a ?b _ } { ?b ?a } match-replace
76 TUPLE: match-replace-test a b ;
79 T{ match-replace-test f 2 1 }
81 T{ match-replace-test f 1 2 }
82 T{ match-replace-test f ?a ?b }
83 T{ match-replace-test f ?b ?a }