I have a library (say mylib) that I always use with core.match/match and have been writing like as follows:
(ns new.work.space (:require [clojure.core.match :refer-macros [match]] [mylib.core :as mylib]))
This has become so repetitive that I now want to require just my own library namespace and call core.match/match through it. So I tried wrapping the core.match macro in my own macro like this:
;; mylib.core.clj (ns mylib.core (:require [clojure.core.match :as core.match])) (defmacro match [& args] (list* 'core.match/match args)) ;; mylib.core.cljs (ns mylib.core (:require-macros [mylib.core :refer [match]]))
And I got the following error:
Uncaught TypeError: Right-hand side of 'instanceof' is not an object
at the point where mylib.core/match was called.
Can anybody help me out?
Edit: Fixed the typo in my question.