From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: map, for-each Date: Sat, 28 Aug 2010 12:35:20 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283023938 15436 80.91.229.12 (28 Aug 2010 19:32:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Aug 2010 19:32:18 +0000 (UTC) Cc: guile-user@gnu.org To: "Eric J. Van der Velden" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Aug 28 21:32:17 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 1OpR8S-0001CI-PP for guile-user@m.gmane.org; Sat, 28 Aug 2010 21:32:17 +0200 Original-Received: from localhost ([127.0.0.1]:35258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpR8R-00075o-4f for guile-user@m.gmane.org; Sat, 28 Aug 2010 15:32:15 -0400 Original-Received: from [140.186.70.92] (port=54965 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpR8L-00075j-KQ for guile-user@gnu.org; Sat, 28 Aug 2010 15:32:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OpR8K-0000AC-9b for guile-user@gnu.org; Sat, 28 Aug 2010 15:32:09 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:51650 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OpR8K-0000A7-7I for guile-user@gnu.org; Sat, 28 Aug 2010 15:32:08 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 31033D170D; Sat, 28 Aug 2010 15:32:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=O8Y+/XEHYsWm+5R/WPzyrhmoS54=; b=YHioDT 1SMiPmS6oWCcQ3oa8JAOsfAZcXdZUsOgazJ/cKPvkl6tn8Y6DQR1H1aP+mW9KEAI tECQsaFtFJ1FwcJ60wt/+lpXQmhiFeWMbq8hdTZYF2n1yfAO2QeVme4yvE2LK/3e IBRe9RC0VnE6jpQeARAQyN0DV83KgtixNz2mY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=PibifRV7s69h06NqeLdpuVWkDacGlOei 3Od4qu9+tEg8k5Wn1RIlZziLHV6BbHAxo2ibP7dGiq/HX9n0P+/2LQZR3cigjlDt ahgGKp+Y0RU1YbwERAjeNYpX0FCSlaa6Mymqs8hqertlJ4qlbG9J5H060+2FrzUY 98ojN4R2C9M= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 1C441D170C; Sat, 28 Aug 2010 15:32:05 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [75.28.21.123]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 9CC1DD170B; Sat, 28 Aug 2010 15:32:03 -0400 (EDT) In-Reply-To: (Eric J. Van der Velden's message of "Thu, 26 Aug 2010 13:17:38 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: F06FF46E-B2DA-11DF-9E8A-030CEE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:8108 Archived-At: On Thu 26 Aug 2010 04:17, "Eric J. Van der Velden" writes: > 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)) Consider: (map + '(1 3)) = (list (+ 1) (+ 3)) = (list 1 3) => (1 3) (map + '(1 3) '(5 7)) = (list (+ 1 5) (+ 3 7)) = (list 6 10) => (6 10) After the function, all args need to be lists. The `display' example you gave, even if you had given for-each lists, still doesn't make sense: (for-each display '(1 3) '(5 7)) = (begin (display 1 5) (display 3 7)) => ERROR: in (display 1 5): 5 is not a port Hope that helps, Andy -- http://wingolog.org/