From 78b132edfc56eff93162e9cd264396528dc6df2d Mon Sep 17 00:00:00 2001 From: Tom Faulhaber Date: Fri, 19 Feb 2010 11:26:52 -0800 Subject: Document the latest branches, et al., in clojure-contrib. Supporting docs currently missing. --- branch-1.1.x/def-api.html | 245 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) create mode 100644 branch-1.1.x/def-api.html (limited to 'branch-1.1.x/def-api.html') diff --git a/branch-1.1.x/def-api.html b/branch-1.1.x/def-api.html new file mode 100644 index 00000000..14a093df --- /dev/null +++ b/branch-1.1.x/def-api.html @@ -0,0 +1,245 @@ + + + def API reference (clojure-contrib) + + + + + + + + + + + + + +
+ + +
+
+
+
+ +

API for def + (1.1.x branch)

+by Unknown
+
Usage: +
+(ns your-namespace
+  (:require clojure.contrib.def))
+
+

Overview

+

+
+

Public Variables and Functions

+
+
+
+

defalias

+ macro
+
Usage: (defalias name orig)
+       (defalias name orig doc)
+
+
Defines an alias for a var: a new var with the same root binding (if
+any) and similar metadata. The metadata of the alias is its initial
+metadata (as provided by def) merged into the metadata of the original.
+ Source +
+
+
+

defhinted

+ macro
+
Usage: (defhinted sym init)
+
+
Defines a var with a type hint matching the class of the given
+init.  Be careful about using any form of 'def' or 'binding' to a
+value of a different type.  See http://paste.lisp.org/display/73344
+ Source +
+
+
+

defmacro-

+ macro
+
Usage: (defmacro- name & decls)
+
+
Same as defmacro but yields a private definition
+ Source +
+
+
+

defn-memo

+ macro
+
Usage: (defn-memo fn-name & defn-stuff)
+
+
Just like defn, but memoizes the function using clojure.core/memoize
+ Source +
+
+
+

defnk

+ macro
+
Usage: (defnk fn-name & fn-tail)
+
+
Define a function accepting keyword arguments. Symbols up to the first
+keyword in the parameter list are taken as positional arguments.  Then
+an alternating sequence of keywords and defaults values is expected. The
+values of the keyword arguments are available in the function body by
+virtue of the symbol corresponding to the keyword (cf. :keys destructuring).
+defnk accepts an optional docstring as well as an optional metadata map.
+ Source +
+
+
+

defonce-

+ macro
+
Usage: (defonce- name expr)
+       (defonce- name expr doc)
+
+
Same as defonce but yields a private definition
+ Source +
+
+
+

defstruct-

+ macro
+
Usage: (defstruct- name & decls)
+
+
Same as defstruct but yields a private definition
+ Source +
+
+
+

defunbound

+ macro
+
Usage: (defunbound name)
+       (defunbound name doc)
+
+
Defines an unbound var with optional doc string
+ Source +
+
+
+

defunbound-

+ macro
+
Usage: (defunbound- name & decls)
+
+
Same as defunbound but yields a private definition
+ Source +
+
+
+

defvar

+ macro
+
Usage: (defvar name)
+       (defvar name init)
+       (defvar name init doc)
+
+
Defines a var with an optional intializer and doc string
+ Source +
+
+
+

defvar-

+ macro
+
Usage: (defvar- name & decls)
+
+
Same as defvar but yields a private definition
+ Source +
+
+
+

name-with-attributes

+ function
+
Usage: (name-with-attributes name macro-args)
+
+
To be used in macro definitions.
+Handles optional docstrings and attribute maps for a name to be defined
+in a list of macro arguments. If the first macro argument is a string,
+it is added as a docstring to name and removed from the macro argument
+list. If afterwards the first macro argument is a map, its entries are
+added to the name's metadata map and the map is removed from the
+macro argument list. The return value is a vector containing the name
+with its extended metadata map and the list of unprocessed macro
+arguments.
+ Source +
+ + +
+
+
+
+
+ +
+
Logo & site design by Tom Hickey.
+ Clojure auto-documentation system by Tom Faulhaber.
+
+ + + + \ No newline at end of file -- cgit v1.2.3-18-g5258