Add versionadded directives for macroexpand and macroexpand-1.
This commit is contained in:
parent
7177afd707
commit
d9d113670e
@ -221,7 +221,7 @@ iterator?
|
|||||||
|
|
||||||
Usage: ``(iterator? x)``
|
Usage: ``(iterator? x)``
|
||||||
|
|
||||||
Return True if x is an iterator. Iterators are objects that return
|
Return True if x is an iterator. Iterators are objects that return
|
||||||
themselves as an iterator when ``(iter x)`` is called.
|
themselves as an iterator when ``(iter x)`` is called.
|
||||||
Contrast with :ref:`iterable?-fn`.
|
Contrast with :ref:`iterable?-fn`.
|
||||||
|
|
||||||
@ -243,11 +243,13 @@ Contrast with :ref:`iterable?-fn`.
|
|||||||
=> (iterator? (iter {:a 1 :b 2 :c 3}))
|
=> (iterator? (iter {:a 1 :b 2 :c 3}))
|
||||||
True
|
True
|
||||||
|
|
||||||
.. _neg?-fn:
|
.. _macroexpand-fn:
|
||||||
|
|
||||||
macroexpand
|
macroexpand
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
.. versionadded:: 0.9.13
|
||||||
|
|
||||||
Usage: ``(macroexpand form)``
|
Usage: ``(macroexpand form)``
|
||||||
|
|
||||||
Returns the full macro expansion of form.
|
Returns the full macro expansion of form.
|
||||||
@ -260,9 +262,13 @@ Returns the full macro expansion of form.
|
|||||||
=> (macroexpand '(-> (a b) (-> (c d) (e f))))
|
=> (macroexpand '(-> (a b) (-> (c d) (e f))))
|
||||||
(u'e' (u'c' (u'a' u'b') u'd') u'f')
|
(u'e' (u'c' (u'a' u'b') u'd') u'f')
|
||||||
|
|
||||||
|
.. _macroexpand-1-fn:
|
||||||
|
|
||||||
macroexpand-1
|
macroexpand-1
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
.. versionadded:: 0.9.13
|
||||||
|
|
||||||
Usage: ``(macroexpand-1 form)``
|
Usage: ``(macroexpand-1 form)``
|
||||||
|
|
||||||
Returns the single step macro expansion of form.
|
Returns the single step macro expansion of form.
|
||||||
@ -272,6 +278,8 @@ Returns the single step macro expansion of form.
|
|||||||
=> (macroexpand-1 '(-> (a b) (-> (c d) (e f))))
|
=> (macroexpand-1 '(-> (a b) (-> (c d) (e f))))
|
||||||
(u'_>' (u'a' u'b') (u'c' u'd') (u'e' u'f'))
|
(u'_>' (u'a' u'b') (u'c' u'd') (u'e' u'f'))
|
||||||
|
|
||||||
|
.. _neg?-fn:
|
||||||
|
|
||||||
neg?
|
neg?
|
||||||
----
|
----
|
||||||
|
|
||||||
@ -372,7 +380,7 @@ if the `n` is outside the range of `coll`.
|
|||||||
|
|
||||||
=> (nth (take 3 (drop 2 [1 2 3 4 5 6])) 2))
|
=> (nth (take 3 (drop 2 [1 2 3 4 5 6])) 2))
|
||||||
5
|
5
|
||||||
|
|
||||||
.. _numeric?-fn:
|
.. _numeric?-fn:
|
||||||
|
|
||||||
numeric?
|
numeric?
|
||||||
@ -549,7 +557,7 @@ To get the Fibonacci number at index 9, (starting from 0):
|
|||||||
.. code-block:: clojure
|
.. code-block:: clojure
|
||||||
|
|
||||||
=> (nth (fib) 9)
|
=> (nth (fib) 9)
|
||||||
34
|
34
|
||||||
|
|
||||||
|
|
||||||
.. _cycle-fn:
|
.. _cycle-fn:
|
||||||
@ -567,7 +575,7 @@ Return an infinite iterator of the members of coll.
|
|||||||
[1, 2, 3, 1, 2, 3, 1]
|
[1, 2, 3, 1, 2, 3, 1]
|
||||||
|
|
||||||
=> (list (take 2 (cycle [1 2 3])))
|
=> (list (take 2 (cycle [1 2 3])))
|
||||||
[1, 2]
|
[1, 2]
|
||||||
|
|
||||||
|
|
||||||
.. _distinct-fn:
|
.. _distinct-fn:
|
||||||
@ -767,7 +775,7 @@ Return an iterator containing the first ``n`` members of ``coll``.
|
|||||||
|
|
||||||
=> (list (take 4 (repeat "s")))
|
=> (list (take 4 (repeat "s")))
|
||||||
[u's', u's', u's', u's']
|
[u's', u's', u's', u's']
|
||||||
|
|
||||||
=> (list (take 0 (repeat "s")))
|
=> (list (take 0 (repeat "s")))
|
||||||
[]
|
[]
|
||||||
|
|
||||||
@ -793,7 +801,7 @@ Return an iterator containing every ``nth`` member of ``coll``.
|
|||||||
|
|
||||||
=> (list (take-nth 10 [1 2 3 4 5 6 7]))
|
=> (list (take-nth 10 [1 2 3 4 5 6 7]))
|
||||||
[1]
|
[1]
|
||||||
|
|
||||||
|
|
||||||
.. _take-while-fn:
|
.. _take-while-fn:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user