guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does #-3# mean?


From: address@hidden
Subject: Re: What does #-3# mean?
Date: Tue, 24 Aug 2010 16:46:58 -0400

I recall that the reader can be hash-extended to read these forms in a hacky 
way. Extend on '-'. I don't recall exactly anymore. I long ago patched the 
reader to read these natively. Perhaps there is some enthusiasm for making 
these readable in the main line?

Cheers,
  Dan

On Aug 24, 2010, at 12:38 PM, address@hidden (Ludovic Courtès) wrote:

> Hi,
> 
> Richard Shann <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]