clojure.core/use¶
Like 'require, but also refers to each lib's namespace using clojure.core/refer. Use :use in the ns macro in preference to calling this directly.
'use accepts additional options in libspecs: :exclude, :only, :rename. The arguments and semantics for :exclude, :only, and :rename are the same as those documented for clojure.core/refer.
Examples¶
Note by gstamp¶
Good description of use/require/import here:
http://blog.8thlight.com/articles/2010/12/6/clojure-libs-and-namespaces-require-use-import-and-ns
Note by vikbehal¶
http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html
Note by rafaroca¶
The blog post from 8thlight is not available under the above URL anymore. The Wayback Machine has a snapshot of it.
https://web.archive.org/web/20220323035057/https://8thlight.com/blog/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html
See also¶
- clojure.core/refer (1)
- clojure.core/require (4)
- clojure.core/ns (3)
- clojure.core/import (2)
Content from the matching ClojureDocs page, with authors credited on each contribution.