Skip to content

Instantly share code, notes, and snippets.

Yehonathan Sharvit viebel

Block or report user

Report or block viebel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@viebel
viebel / regex_as_a_function.cljs
Last active Jun 10, 2016 — forked from alandipert/reinvoke.cljs
Make a regex behave like a function
View regex_as_a_function.cljs
; Make a regex behave like a function
; Inspired by: http://blog.klipse.tech/clojure/2016/04/07/ifn.html
(extend-type js/RegExp
IFn
(-invoke ([this s] (re-find this s))))
(#"clojure" "clojurescript")
You can’t perform that action at this time.