简体   繁体   English

Clojure(脚本)空名称空间

[英]Clojure(Script) empty namespace

For an embedded DSL I'd like to remove all the core functions and require the ones I need one by one. 对于嵌入式DSL,我想删除所有核心功能,并逐一要求。 Is it possible and how? 有可能吗?

You can use the :refer-clojure directive in your ns declaration to specify only the core functions you need: 您可以在ns声明中使用:refer-clojure指令仅指定所需的核心功能:

(ns my-namespace
  (:refer-clojure :only [defn]))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM