Skip to content

clojure.core/use

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 5 Runnable: 1
([& args])

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

by scode on . May have evaluation errors.
by dpritchett on
by boxie on . May have evaluation errors.
by mars0i on . May have evaluation errors.
by mars0i on . May have evaluation errors.

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


Content from the matching ClojureDocs page, with authors credited on each contribution.