From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.help Subject: Re: Precedence of for clauses in cl-loop Date: Fri, 7 Sep 2018 07:16:36 -0400 Message-ID: References: <20180906183335.ADFDB3381CF@munka.dynalias.org> <20180907070834.E7B4B3381CF@munka.dynalias.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1536318908 1514 195.159.176.226 (7 Sep 2018 11:15:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2018 11:15:08 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: Plamen Tanovski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 07 13:15:04 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fyEj8-0000C8-4r for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Sep 2018 13:15:02 +0200 Original-Received: from localhost ([::1]:37913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyElE-0006N8-Gk for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Sep 2018 07:17:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyEkh-0006Mu-1N for help-gnu-emacs@gnu.org; Fri, 07 Sep 2018 07:16:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyEkg-0005qx-8V for help-gnu-emacs@gnu.org; Fri, 07 Sep 2018 07:16:39 -0400 Original-Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:43603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fyEkg-0005qY-1X for help-gnu-emacs@gnu.org; Fri, 07 Sep 2018 07:16:38 -0400 Original-Received: by mail-oi0-x231.google.com with SMTP id b15-v6so26500740oib.10 for ; Fri, 07 Sep 2018 04:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HIxEuNKfitCZiKugNVjmxfvE5c130yTOHzuwAm7SFmc=; b=kt7zzvLoePcG0j/89X7rJK/VhvHDQf4hsYo8V1eQJYjPsMx219L5LkUP6UoWi10sUg 84BXKMuRJcNWgK1G+IPI++WVaLy7bhVptVmGQstk0bxPvCje3MoTEJHH+lJyQcZ75YG8 hvC/KzyDMRRF6xR3q4+2AMISTOkbSadXIHGfR7Y+42Sn75ajZt3wJHMGAfF1Y07lVJ/h wUJWOizth+s6zukX56uvrn4A6Q/5NOjU0QwVNnwkheqYJVzrX1uXGgyDe0+v0Pr+y1WF SNYSWDUsSrp/ddyQIj0qdvmKhwvaJ4PBc8lT3YOewzYd5qnHSbcpw/Ih+PeT5KvClkeJ t4Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HIxEuNKfitCZiKugNVjmxfvE5c130yTOHzuwAm7SFmc=; b=TTqjAnkfGaCfUtdi+I+x5K/Mu4wGs0acZS8G4ONtBfTsiiyHbp4Tbl61qS24xy507l 6LYlG6EMkvy8PDT8fHEVZS2FtkzOmocLu4LVhVynuYIwGglcDwMMjoUPPr/jlXoplcAV c5j8d4hFCCc75YJ1WrnGENw/EIUUvsCByu6F0E9W3MrBUXRtjUzxB93UEM1QKvD35LHZ 2lfTYq26o+i+OXDiKSad31C/wsiZses++WiCaRRe6nDehaTDV525G64Alaxn3LjtHYeQ 2f4pvS1sEiVf5bQkBUImswiT6xDCDeywHoNhn1ehSMo/kwXxh/3MTdjtMR58o90cru1g mhAg== X-Gm-Message-State: APzg51AedPLbzJsXAq4P9MR8pcwv/YZDX8Gr0SjN0H3tMHvHPXphhJKc AXXW9faPMBW3s+YLf/tu8doBJO3O4zZJeXofDeEyWppx X-Google-Smtp-Source: ANB0VdalP5wvMgO/5PHWXIch+h1X3tbHxb0Fj2DPyYt9G/hve9QlwsH8bfHXvnjHnJTCsf6VEoBcY9NCPZtuv4rURRE= X-Received: by 2002:aca:c2c1:: with SMTP id s184-v6mr7242261oif.117.1536318997181; Fri, 07 Sep 2018 04:16:37 -0700 (PDT) Original-Received: by 2002:a9d:540f:0:0:0:0:0 with HTTP; Fri, 7 Sep 2018 04:16:36 -0700 (PDT) In-Reply-To: <20180907070834.E7B4B3381CF@munka.dynalias.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::231 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117839 Archived-At: On 7 September 2018 at 03:08, Plamen Tanovski wrote: > 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)) This example also gives an error: (cl-loop for x in (number-sequence 1 10) for z in (elt (number-sequence 1 10) (1+ x))) because a `for VAR in LIST' clause evaluates LIST just once before the loop starts. The "treated sequentially" in the manual refers to the assignment of VAR. For example, this gives an error: (cl-loop for y = (1+ x) for x in (number-sequence 1 10)) And this does not: (cl-loop for x in (number-sequence 1 10) for y = (1+ x))