From 296b6eaa2a1cc6bfa8747ee39fc4100d417cd8e0 Mon Sep 17 00:00:00 2001 From: Ewald Grusk Date: Sat, 13 Jun 2015 21:10:57 +0200 Subject: [PATCH] documents order of variable assignments in let expressions --- docs/language/api.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/language/api.rst b/docs/language/api.rst index 5562c1d..1011213 100644 --- a/docs/language/api.rst +++ b/docs/language/api.rst @@ -988,6 +988,14 @@ used. => (let [x [y 5]] (print x y)) None 5 +Note that the variable assignments are executed one by one, from left to right. +The following example takes advantage of this: + +.. code-block:: clj + + => (let [[x 5] [y (+ x 1)]] (print x y)) + 5 6 + list-comp ---------