Skip to content

Instantly share code, notes, and snippets.

@devn
Forked from alandipert/reinvoke.cljs
Created December 7, 2013 23:54
(extend-type js/RegExp
cljs.core.IFn
(-invoke ([this s] (re-matches this s))))
(#"foo.*" "foobar") ;=> "foobar"
(#"zoo.*" "foobar") ;=> nil
(filter #".*foo.*" ["foobar" "goobar" "foobaz"]) ;=> ("foobar" "foobaz")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment