From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Al=C3=ADrio?= Eyng Newsgroups: gmane.lisp.guile.bugs Subject: bug#17825: broken set! in iteration Date: Sat, 21 Jun 2014 01:25:56 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1403333404 19810 80.91.229.3 (21 Jun 2014 06:50:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Jun 2014 06:50:04 +0000 (UTC) To: 17825@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Jun 21 08:49:57 2014 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WyF7c-00014W-QT for guile-bugs@m.gmane.org; Sat, 21 Jun 2014 08:49:57 +0200 Original-Received: from localhost ([::1]:43946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyF7c-0004ue-BI for guile-bugs@m.gmane.org; Sat, 21 Jun 2014 02:49:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyBSJ-0007SP-P4 for bug-guile@gnu.org; Fri, 20 Jun 2014 22:55:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WyBSI-0007jC-VH for bug-guile@gnu.org; Fri, 20 Jun 2014 22:55:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyBSI-0007iz-SR for bug-guile@gnu.org; Fri, 20 Jun 2014 22:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WyBSI-0000Vo-Ir for bug-guile@gnu.org; Fri, 20 Jun 2014 22:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Al=C3=ADrio?= Eyng Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 21 Jun 2014 02:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17825 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14033192831933 (code B ref -1); Sat, 21 Jun 2014 02:55:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jun 2014 02:54:43 +0000 Original-Received: from localhost ([127.0.0.1]:55309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WyBRy-0000V6-IA for submit@debbugs.gnu.org; Fri, 20 Jun 2014 22:54:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33561) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WyA4D-0006eV-VO for submit@debbugs.gnu.org; Fri, 20 Jun 2014 21:26:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WyA47-00024R-WE for submit@debbugs.gnu.org; Fri, 20 Jun 2014 21:26:00 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyA47-00024N-So for submit@debbugs.gnu.org; Fri, 20 Jun 2014 21:25:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyA46-0008PG-VS for bug-guile@gnu.org; Fri, 20 Jun 2014 21:25:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WyA45-000246-SO for bug-guile@gnu.org; Fri, 20 Jun 2014 21:25:58 -0400 Original-Received: from mail-oa0-x230.google.com ([2607:f8b0:4003:c02::230]:60984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WyA45-00023u-NO for bug-guile@gnu.org; Fri, 20 Jun 2014 21:25:57 -0400 Original-Received: by mail-oa0-f48.google.com with SMTP id m1so8068724oag.35 for ; Fri, 20 Jun 2014 18:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=3ySoL4nFfpjwfxUl+1x529O+f1FQh+SC4hlH9PL+TwA=; b=dE1MuURVS6MrWuiEZ57jpUnYhTbinkymxhxDNA0LrNjs1gpJFWG+BL6kHbR1X+2fx7 NCpqI5bBDW0I39VmqQdvXU5KgSOtev2vhzRaTqo80EiArizVGh0ptqxB6n0aI0fvkCU9 ik2kjMGsHPrGESc7k6VdpW5cjMVrI1YOL4CZWcS4id99Ah5tDMKzdNeEAzt0a7L4c0on +0UsRyTrF5RGuoqQ42ejVXv5eUA+vgJwN7VWma3r9bafIpZ9HRItuS/ya3HntBU1K0fq 7bZwcYL95cbwkfQLEjM7VD2UhJgTXZ7wie//iUd2QWZt15xpdOmWgb9JBU7PY1b4y3yy D4sA== X-Received: by 10.182.112.161 with SMTP id ir1mr7207854obb.41.1403313956510; Fri, 20 Jun 2014 18:25:56 -0700 (PDT) Original-Received: by 10.202.98.85 with HTTP; Fri, 20 Jun 2014 18:25:56 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Fri, 20 Jun 2014 22:54:40 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Sat, 21 Jun 2014 02:49:52 -0400 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7503 Archived-At: I can't see why the second code doesn't work like the first: (use-modules (srfi srfi-1)) (define D '(((3 4)))) (let ((r 1)) (set! D (append D '(()))) (display D)(newline) (set-car! (drop D r) (car (drop D (- r 1))))) (let ((r 2)) (set! D (append D '(()))) (display D)(newline) (set-car! (drop D r) (car (drop D (- r 1))))) output: (((3 4)) ()) (((3 4)) ((3 4)) ()) (use-modules (srfi srfi-1)) (define D '(((3 4)))) (map (lambda (r) (set! D (append D '(()))) (display D)(newline) (set-car! (drop D r) (car (drop D (- r 1))))) '(1 2)) output: (((3 4)) ()) (((3 4)) ((3 4)) ((3 4))) guile (GNU Guile) 2.0.11 i686-pc-linux-gnu