diff --git a/docs/contrib/walk.rst b/docs/contrib/walk.rst index e6d333e..8fea960 100644 --- a/docs/contrib/walk.rst +++ b/docs/contrib/walk.rst @@ -240,7 +240,8 @@ The ``let`` macro takes two parameters: a list defining *variables* and the *body* which gets executed. *variables* is a vector of variable and value pairs. -``let`` executes the variable assignments one-by-one, in the order written. +Like the ``let*`` of many other Lisps, ``let`` executes the variable +assignments one-by-one, in the order written:: .. code-block:: hy @@ -249,4 +250,8 @@ variable and value pairs. ... (print x y)) 5 6 +Unlike them, however, each ``(let …)`` form uses only one +namespace for all its assignments. Thus, ``(let [x 1 x (fn [] x)] +(x))`` returns a function object, not 1 as you might expect. + It is an error to use a let-bound name in a ``global`` or ``nonlocal`` form.