UP | HOME

Tip for creating and using macros in single ".cljc" file.
하나의 .cljc 파일에서 매크로 만들고 사용하는 팁.

When you create and use macros in a single ".cljc" file. You have to include macros as follows:

(ns my.ns #?(:cljs (:require-macros [my.ns :refer [macro-name]])))

(defmacros macro-name [] nil)
(macro-name)