From 66b16d15f526b64d803c8a935606d4b0d4795854 Mon Sep 17 00:00:00 2001 From: Endre Bakken Stovner Date: Fri, 16 Oct 2015 20:28:30 +0200 Subject: [PATCH] Add import anamorphic macros info Small change thanks to kirbyfan64 --- docs/contrib/anaphoric.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/contrib/anaphoric.rst b/docs/contrib/anaphoric.rst index db36ffc..cce39e0 100644 --- a/docs/contrib/anaphoric.rst +++ b/docs/contrib/anaphoric.rst @@ -13,6 +13,9 @@ concise and easy to read. -- Wikipedia (http://en.wikipedia.org/wiki/Anaphoric_macro) +To use these macros you need to require the hy.contrib.anaphoric module like so: + +``(require hy.contrib.anaphoric)`` .. _ap-if: @@ -233,7 +236,7 @@ xi Usage ``(xi body ...)`` -Returns a function with parameters implicitly determined by the presence in the body of xi parameters. An xi symbol designates the ith parameter (1-based, e.g. x1, x2, x3, etc.), or all remaining parameters for xi itself. This is not a replacement for lambda. The xi forms cannot be nested. +Returns a function with parameters implicitly determined by the presence in the body of xi parameters. An xi symbol designates the ith parameter (1-based, e.g. x1, x2, x3, etc.), or all remaining parameters for xi itself. This is not a replacement for lambda. The xi forms cannot be nested. This is similar to Clojure's anonymous function literals (``#()``). @@ -244,5 +247,3 @@ This is similar to Clojure's anonymous function literals (``#()``). => (def add-10 (xi + 10 x1)) => (add-10 6) 16 - -