Skip to content

Commit

Permalink
Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
fogus committed Jul 24, 2013
1 parent 0e00aff commit 636efbf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/clojure/clojure/core/unify.clj
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,15 @@
(.replace root "")
(.split "/")
seq
(unify- tmpl))))
(unify tmpl))))

(def match (make-matcher "http://foo.com/foo/"))

(match T {:url "http://foo.com/foo/1/2"})
;;=> {?a 1, ?b 2}
(match T {:url "http://foo.com/foo/fee/fi"})
;;=> {?a "fee", ?b "fi"}

(match T {:url "http://foo.com/foo/1"})
(match T {:url "http://foo.com/foo/flub"})
;;=> {?a "flub"}

(defn make-genr
[root]
Expand Down

0 comments on commit 636efbf

Please sign in to comment.