[racket] what is this thing: '#(struct:foo 3 4) ?
On Sep 10, 2010, at 9:34 AM, Matthew Flatt wrote:
> At Fri, 10 Sep 2010 09:21:28 -0700, John Clements wrote:
>> I've spent long enough with the docs on this not to feel too embarrassed about
>> this question: what kind of value is produced by
>>
>> '#(struct:foo 3 4)
>>
>> (N.B. the leading quote)
>
> Are you by chance using the PLAI language that is distributed with 5.0.1?
>
> I ask because this looks like something that would be produced by the
> broken printer in that version.
No:
#lang racket
(define-struct foo (a b) #:transparent)
(define o (open-output-string))
(write (make-foo 3 4) o)
(read (open-input-string (get-output-string o)))
=>
Welcome to DrRacket, version 5.0.1.5--2010-09-08(93ee20e/g) [3m].
Language: racket; memory limit: 256 MB.
(foo 3 4)
'#(struct:foo 3 4)
>
And to everyone else: D'oh! Okay, I do feel embarrassed.
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4669 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20100910/776cd2d6/attachment.p7s>