all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Plamen Tanovski <pgt@tanovski.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Precedence of for clauses in cl-loop
Date: Fri, 07 Sep 2018 09:08:34 +0200	[thread overview]
Message-ID: <20180907070834.E7B4B3381CF@munka.dynalias.org> (raw)
In-Reply-To: CAM-tV-8ZLzOOUbOMx5OVNA3pigjC1h7rmE8Tc0Gyj1pVK1roWQ@mail.gmail.com

Noam Postavsky <npostavs@gmail.com> writes:

> On 6 September 2018 at 14:33, Plamen Tanovski <pgt@tanovski.de> wrote:
>
>> in this simple example
>>
>> (cl-loop for y = x
>>          for x in '(1 2)
>>          for z in '(1 2))
>>
>>
>> the "for in" clauses are executed before the "for =" clause.
>
> I disagree. I invite you to prove me wrong.

simply edebug the loop shows the precedence, but below as example a loop
which gives error, beacuse the z part is executed before the y line:

(cl-loop
 for x in (number-sequence 1 10)
 for y = (1+ x) 
 for z in (elt (number-sequence 1 10) y))


-- 
Plamen Tanovski




  reply	other threads:[~2018-09-07  7:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06 18:33 Precedence of for clauses in cl-loop Plamen Tanovski
2018-09-06 22:43 ` Noam Postavsky
2018-09-07  7:08   ` Plamen Tanovski [this message]
2018-09-07 11:16     ` Noam Postavsky
2018-09-07 12:35       ` Plamen Tanovski
2018-09-08  1:37         ` Noam Postavsky
     [not found]         ` <mailman.511.1536370625.1284.help-gnu-emacs@gnu.org>
2018-09-08 14:41           ` Udyant Wig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180907070834.E7B4B3381CF@munka.dynalias.org \
    --to=pgt@tanovski.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.