0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-02 20:39:09 -05:00
penpot/frontend/uxbox/util/syntax.cljc

9 lines
219 B
Text
Raw Normal View History

(ns uxbox.util.syntax
(:refer-clojure :exclude [defonce]))
(defmacro define-once
2016-01-10 23:50:10 +02:00
[name' & body]
(let [sym (symbol (str (namespace name') "-" (name name')))]
`(cljs.core/defonce ~sym
2016-01-10 23:50:10 +02:00
(do ~@body nil))))