Skip to content

Instantly share code, notes, and snippets.

@devn
Forked from alandipert/reinvoke.cljs
Created December 7, 2013 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devn/7851512 to your computer and use it in GitHub Desktop.
Save devn/7851512 to your computer and use it in GitHub Desktop.
(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