From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Emsley Newsgroups: gmane.lisp.guile.user Subject: Re: map, for-each Date: Thu, 26 Aug 2010 13:16:10 +0100 Message-ID: <4C765B0A.8010608@bioch.ox.ac.uk> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282825034 16449 80.91.229.12 (26 Aug 2010 12:17:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Aug 2010 12:17:14 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Aug 26 14:17:13 2010 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OobOH-00018s-Qj for guile-user@m.gmane.org; Thu, 26 Aug 2010 14:17:10 +0200 Original-Received: from localhost ([127.0.0.1]:56017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OobO3-0002H0-MJ for guile-user@m.gmane.org; Thu, 26 Aug 2010 08:16:55 -0400 Original-Received: from [140.186.70.92] (port=51755 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OobNw-0002Ew-3m for guile-user@gnu.org; Thu, 26 Aug 2010 08:16:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OobNC-0007dH-9V for guile-user@gnu.org; Thu, 26 Aug 2010 08:16:03 -0400 Original-Received: from smtp815.mail.ird.yahoo.com ([77.238.189.20]:30785) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OobNC-0007cn-0h for guile-user@gnu.org; Thu, 26 Aug 2010 08:16:02 -0400 Original-Received: (qmail 22390 invoked from network); 26 Aug 2010 12:15:59 -0000 Original-Received: from [192.168.1.64] (paul.emsley@86.157.189.156 with plain) by smtp815.mail.ird.yahoo.com with SMTP; 26 Aug 2010 12:15:59 +0000 GMT X-Yahoo-SMTP: 3cy_nR2swBDp2AOGSGmmtUxaCi_8hcC_DOmCw_S4Lgz_qEz3hLayaYX7oPY.PnAO X-YMail-OSG: LcMZJKUVM1ka3uYFdeoZPvWT.XaffVrdw0x9va9UbT6O2Lc hiXCXLle8x03F.hQV.0RUXVuZNiuRWAL_5gLGuqMMVGcAS5OeCCPsagrXG6h fnpbuhT1OvohVcQHj9PPugeeGgRFi_B1E4CsqZFLWrJWuitanlYAxUfhRa0X CpvyhmkSKuPxTSxcvIcQybhJjp5CnLY8CidTliYR28etZJtGEuDC59Pipbeo M_BHbohek3w-- X-Yahoo-Newman-Property: ymail-3 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8101 Archived-At: On 26/08/10 12:17, Eric J. Van der Velden wrote: > Hello, > > I don't understand what the manual says about when there are more then > two arguments to map or for-each. > > With two arguments, the last one must be a list, so OK is > > (for-each display '(1 3)) > > But the following are ERR, > > (for-each display 1 3) > > (for-each display '(1 3) '(1 3)) The function, in this case `display', needs to be able to take 2 args, for display it's the variable and the port: (for-each display '(1 3) (list (current-output-port) (current-output-port))) also consider (map + '(1 3) '(1 3)) Paul.