From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Shann Newsgroups: gmane.lisp.guile.user Subject: Re: Syntactic significance of dot Date: Tue, 23 Sep 2014 09:49:44 +0100 Message-ID: <1411462184.3458.154.camel@DebianBox.loc> References: <1411409556.3458.145.camel@DebianBox.loc> <87sijj1iau.fsf@elektro.pacujo.net> Reply-To: richard@rshann.plus.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1411463446 21566 80.91.229.3 (23 Sep 2014 09:10:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Sep 2014 09:10:46 +0000 (UTC) Cc: guile-user@gnu.org To: Marko Rauhamaa , Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Sep 23 11:10:40 2014 Return-path: Envelope-to: guile-user@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 1XWLo8-00085y-9G for guile-user@m.gmane.org; Tue, 23 Sep 2014 10:50:48 +0200 Original-Received: from localhost ([::1]:51573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWLo7-0005CV-Tm for guile-user@m.gmane.org; Tue, 23 Sep 2014 04:50:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWLnf-0005A8-Rk for guile-user@gnu.org; Tue, 23 Sep 2014 04:50:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWLna-00071r-8t for guile-user@gnu.org; Tue, 23 Sep 2014 04:50:19 -0400 Original-Received: from avasout06.plus.net ([212.159.14.18]:57529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWLna-00071K-2G for guile-user@gnu.org; Tue, 23 Sep 2014 04:50:14 -0400 Original-Received: from [192.168.1.68] ([146.200.136.46]) by avasout06 with smtp id uYq41o00410ERcJ01Yq5Zo; Tue, 23 Sep 2014 09:50:07 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=HNxNF+dv c=1 sm=1 tr=0 a=AHjtjGwy0IzrLE6AiyUBXA==:117 a=AHjtjGwy0IzrLE6AiyUBXA==:17 a=0Bzu9jTXAAAA:8 a=TG0exRZ46NcA:10 a=X9hoWghAxsQA:10 a=ihvODaAuJD4A:10 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=mDV3o1hIAAAA:8 a=TxLjUY-87ZzdciDtI5IA:9 a=QEXdDO2ut3YA:10 a=-a8kcpcHrqkA:10 a=OT545JAzvbMA:10 X-AUTH: rshann:2500 In-Reply-To: <87sijj1iau.fsf@elektro.pacujo.net> X-Mailer: Evolution 3.4.4-3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 212.159.14.18 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11549 Archived-At: On Tue, 2014-09-23 at 00:01 +0300, Marko Rauhamaa wrote: > Richard Shann : > > > I've come across some (working) scheme code whose meaning I can't > > unravel. The problem is there is a "." character whose significance > > eludes me. The guile reference doesn't index this character, and I can > > only find references to it in writing literal pairs. > > That's what it's for and nothing else, including in your example. > > (a b . c) > > is equivalent to > > (a . (b . c)) Thank you for the replies to my email. I see that in the case I cited it is being used to construct a list - the last element is a list. This looks like a major omission in the guile documentation, under pairs http://www.gnu.org/software/guile/manual/html_node/Pairs.html#Pairs it says: "Pairs can literally get entered in source code or at the REPL, in the so-called dotted list syntax. This syntax consists of an opening parentheses, the first element of the pair, a dot, the second element and a closing parentheses." and under lists http://www.gnu.org/software/guile/manual/html_node/List-Syntax.html#List-Syntax "The syntax for lists is an opening parentheses, then all the elements of the list (separated by whitespace) and finally a closing parentheses." but the syntax for a list can also be ...then elements of the list (separated by whitespace) a dot followed by a list followed by a closing parenthesis" - this doesn't quite describe using this syntax for improper lists though. Anyway, I am thoroughly educated on this topic now :) Thank you both very much. Richard