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: Need help with a macro Date: Sun, 15 Nov 2009 19:18:33 +0100 Message-ID: References: <20091115163303.GD29831@raven.wolf.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258317345 3826 80.91.229.12 (15 Nov 2009 20:35:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Nov 2009 20:35:45 +0000 (UTC) Cc: guile-user@gnu.org To: Josef Wolf Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Nov 15 21:35:38 2009 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.50) id 1N9lot-0001ZS-8q for guile-user@m.gmane.org; Sun, 15 Nov 2009 21:35:35 +0100 Original-Received: from localhost ([127.0.0.1]:44090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9los-0006X3-LY for guile-user@m.gmane.org; Sun, 15 Nov 2009 15:35:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N9lod-0006R4-TT for guile-user@gnu.org; Sun, 15 Nov 2009 15:35:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N9loZ-0006Oa-BA for guile-user@gnu.org; Sun, 15 Nov 2009 15:35:19 -0500 Original-Received: from [199.232.76.173] (port=38581 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9loZ-0006OT-2R for guile-user@gnu.org; Sun, 15 Nov 2009 15:35:15 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:61305 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N9loY-00086L-NL for guile-user@gnu.org; Sun, 15 Nov 2009 15:35:14 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 959A39EEF1; Sun, 15 Nov 2009 15:35:14 -0500 (EST) 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=U2vvOAnba8sL69VaUHAyTz0B168=; b=GC442a BO3utOhS/ElvbB3kz5PK6PNI/cIkt6Xyaa38t8PLtccwp+0y6wK/f0qZF+cn+w1C I1+XBEjN5ISy2W6QwAKXXNTbY2SSwYfQhYcxKp2LM1ClEdXCBeo/zUI0TrnmxOOp T6UWusDNkWABpv84pXvPUcGOVgqulprPEauaE= 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=Ki9XzF63El06wlZZmvBMzrG9xwnTz2pY GLPf8b4yK+TUdvbXj8j6WW9Zp1lBzCinfcQfYVQNFT+Bdy1PcWjauodulsYOZyfz g9F0ij5LZp6uT4egL61/FXSrTXSFwtd3qn3P+XF7f0q99Z4nISSSD8c8wGUaVudB s5zNpfeoHbc= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 80B939EEEE; Sun, 15 Nov 2009 15:35:13 -0500 (EST) Original-Received: from unquote (unknown [79.151.217.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id BE60A9EEEC; Sun, 15 Nov 2009 15:35:11 -0500 (EST) In-Reply-To: <20091115163303.GD29831@raven.wolf.lan> (Josef Wolf's message of "Sun, 15 Nov 2009 17:33:03 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: 605ABBA6-D226-11DE-B252-EF34BBB5EC2E-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by monty-python.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:7485 Archived-At: Hello, On Sun 15 Nov 2009 17:33, Josef Wolf writes: > Hello, > > I am trying to work through the little schemer book. In order to make it > easier to go through the examples, I've come up with the following macro: > > ;;; Helper to visualize > > (define-macro (disp exp) > (display exp) (newline) > `(display ,exp) > ; (newline) (newline) > ) Does the little schemer book actually use defmacro? Anyway the issue is that defmacro needs to return Scheme code as an s-expression. The last expression in a function is its return value. That would be the `(display ,exp) bit there. But if you uncomment the newlines, well, you return whatever newline returns, which is actually unspecified. Good luck, Andy -- http://wingolog.org/