From e0ecaca315cdc061905e1464e5245e1c13a96f40 Mon Sep 17 00:00:00 2001 From: Matthew Egan Odendahl Date: Sun, 19 Jun 2016 21:14:16 -0600 Subject: [PATCH] Clarify as-> docstring --- hy/core/macros.hy | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hy/core/macros.hy b/hy/core/macros.hy index dc3c316..e6c8e16 100644 --- a/hy/core/macros.hy +++ b/hy/core/macros.hy @@ -31,10 +31,11 @@ [hy._compat [PY33 PY34]]) (defmacro as-> [head name &rest rest] - "Becomes ordered assignments to the provided name. The previous result - is thus available in each form. Returns the final result, and leaves the name - bound to it in the local scope. This behaves like the threading macros, but - requires you to specify the threading point per form via the name." + "Expands to sequence of assignments to the provided name, starting with head. + The previous result is thus available in the subsequent form. Returns the + final result, and leaves the name bound to it in the local scope. This behaves + much like the other threading macros, but requires you to specify the threading + point per form via the name instead of always the first or last arument." `(do (setv ~name ~head ~@(interleave (repeat name) rest))