From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: Multiple values passed as single argument to procedure Date: Mon, 12 Jun 2017 23:45:21 -0400 Message-ID: <8737b41rfy.fsf@netris.org> References: <87mv9fnejc.fsf@gmail.com> <87k24i2rev.fsf@netris.org> <87zidexdjw.fsf@gmail.com> <87a85d3k9n.fsf@netris.org> <87mv9dy5wb.fsf@gmail.com> <87mv9d7dfu.fsf@fencepost.gnu.org> <87wp8h1lyh.fsf@netris.org> <87h8zl7086.fsf@fencepost.gnu.org> <87h8zk1v3v.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1497325560 16015 195.159.176.226 (13 Jun 2017 03:46:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Jun 2017 03:46:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: guile-user@gnu.org To: David Kastrup Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jun 13 05:45:54 2017 Return-path: Envelope-to: guile-user@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 1dKcm9-0003m4-JK for guile-user@m.gmane.org; Tue, 13 Jun 2017 05:45:53 +0200 Original-Received: from localhost ([::1]:40981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKcmE-0001e9-Up for guile-user@m.gmane.org; Mon, 12 Jun 2017 23:45:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKclu-0001e4-H5 for guile-user@gnu.org; Mon, 12 Jun 2017 23:45:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKclq-0007ds-WE for guile-user@gnu.org; Mon, 12 Jun 2017 23:45:38 -0400 Original-Received: from world.peace.net ([50.252.239.5]:44448) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dKclq-0007ca-RL; Mon, 12 Jun 2017 23:45:34 -0400 Original-Received: from pool-72-93-33-54.bstnma.east.verizon.net ([72.93.33.54] helo=jojen) by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dKclp-0008PK-5X; Mon, 12 Jun 2017 23:45:33 -0400 In-Reply-To: <87h8zk1v3v.fsf@netris.org> (Mark H. Weaver's message of "Mon, 12 Jun 2017 22:26:12 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 50.252.239.5 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13834 Archived-At: Mark H Weaver writes: > The reason that (f) is not in tail position with respect to (list (f)) > is because there is still something left to do after calling (f) but > before invoking the continuation of (list (f)). The thing remaining to > do is to apply 'list' to the returned value. > > Putting it another way, if (f) evaluates to 5, you cannot proceed by > reducing (list (f)) to 5. The continuation of (f) cannot be the same as > the continuation of (list (f)), because that would skip the step of > calling 'list'. FYI, the precise rules for what it means to be in "tail position" are given in R6RS section 11.20 and R7RS section 3.5. In those documents, they call the same concept "tail context". See: http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_sec_11.20 Mark