unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: What does #-3# mean?
Date: Tue, 24 Aug 2010 18:38:02 +0200	[thread overview]
Message-ID: <87occsezkl.fsf@gnu.org> (raw)
In-Reply-To: 1282579402.2957.6.camel@debianrts.home

Hi,

Richard Shann <richard.shann@virgin.net> writes:

> I am displaying a structure that seems to be circular, and it shows
>
> (x_LIST . #-3#)
>
> x_LIST is my own symbol but what is the meaning of the other member of the pair?

Indeed, it means it’s a circular list:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (use-modules (srfi srfi-1))
scheme@(guile-user)> (circular-list 1 2 3)
$1 = (1 2 3 . #-2#)
scheme@(guile-user)> (circular-list 1)
$2 = (1 . #0#)
--8<---------------cut here---------------end--------------->8---

> And how does one track it down this notation in the guile manual? I am
> sure I came across this before, but cannot locate it in the manual
> (again?)

It doesn’t seem to be documented but you get the idea.  ;-)

Note that ‘read’ doesn’t understand it.

Thanks,
Ludo’.




  reply	other threads:[~2010-08-24 16:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 16:03 What does #-3# mean? Richard Shann
2010-08-24 16:38 ` Ludovic Courtès [this message]
2010-08-24 20:46   ` dskr
2010-08-24 22:46     ` Andreas Rottmann
2010-08-25  9:52       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87occsezkl.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).