Created
February 6, 2017 14:43
-
-
Save pbaille/007ac639fbd178e640d8310397ba2977 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Copyright (c) 2015 Designed.ly, Marcin Bilski | |
| ; The use and distribution terms for this software are covered by the | |
| ; Eclipse Public License which can be found in the file LICENSE at the root of this distribution. | |
| ; By using this software in any fashion, you are agreeing to be bound by the terms of this license. | |
| ; You must not remove this notice, or any other, from this software. | |
| (ns reforms.core.import | |
| (:require [cljs.analyzer.api :as ana-api])) | |
| (defmacro import-vars [[_quote ns]] | |
| `(do | |
| ~@(->> | |
| (ana-api/ns-interns ns) | |
| (remove (comp :macro second)) | |
| (map (fn [[k# _]] | |
| `(def ~(symbol k#) ~(symbol (name ns) (name k#)))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment