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

*To*: James McCartney <address@hidden>*Subject*: Re: can s-exprs represent a graph without eval?*From*: Robby Findler <address@hidden>*Date*: Thu, 19 Jun 2003 12:51:54 -0500*Cc*: address@hidden*In-reply-to*: <3317306E-A27B-11D7-8292-00039315CD46@io.com>*References*: <3317306E-A27B-11D7-8292-00039315CD46@io.com>*Sender*: address@hidden

At Thu, 19 Jun 2003 10:26:45 -0700, James McCartney wrote: > S-exprs can represent trees of data easily. I am wondering if s-exprs, > or some other syntax, can be used to represent a graph just on reading, > without eval. Scheme does this already; this: #1=(1 . #1#) Is the same as: (define l '(1)) (set-cdr! l l) ie a cons pair where the car is the 1 and the cdr is the pair itself. You use #n= to "bind" a point in the sexp and #n# to refer to that point in the sexp (where `n' can at least be a string of digits; I don't know if it can be more). I don't believe that that this is in R5RS, but PLT Scheme and Chez Scheme (and probably others) support it. Robby

**Follow-Ups**:**Re: can s-exprs represent a graph without eval?***From:*James McCartney <asynth@io.com>

**References**:**can s-exprs represent a graph without eval?***From:*James McCartney <asynth@io.com>

- Prev by Date:
**Re: can s-exprs represent a graph without eval?** - Next by Date:
**Re: can s-exprs represent a graph without eval?** - Previous by thread:
**Re: can s-exprs represent a graph without eval?** - Next by thread:
**Re: can s-exprs represent a graph without eval?** - Index(es):