[plt-scheme] Specifics on how display works..

From: Jim Witte (jswitte at bloomington.in.us)
Date: Sun Apr 24 01:38:48 EDT 2005

Hi,

The following display statement will run, display a complicated list 
like I want (a representation of an FSM in a program I'm writing"

(display '(["Stop at a B" "AB" 2]
            [('first [('A 'first 'right)
                      ('B 'second 'right)])
             ('second [('A ("Found a B"))
                       ('B ("Found a B"))])]) )

but this will not, treating part of it as a procedure application, not 
a list:

(display '[["Stop at a B" "ABC" 2]
            [('first [('A 'first 'right)
                      ('B 'second 'right)])
             ('second [('A ("Found a B"))
                       ('B ("Found a B"))])]] )

   I thought that the '(; and '[' characters were identical as 
list-delimiters as far as RSR5 was concerned?  Or is '['  a way to do 
an application, even within a list structure (similar to an unquote in 
a backquoted list?)

Jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 971 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20050424/4c9d5bdb/attachment.bin>

Posted on the users mailing list.