[racket] Fwd: display problem

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Fri Apr 6 03:22:38 EDT 2012

---------- Forwarded message ----------
From: *Danny Yoo*
Date: Friday, April 6, 2012
Subject: [racket] display problem
To: Roelof Wobben <r.wobben at home.nl>
Cc: Danny Yoo <dyoo at cs.wpi.edu>




On Friday, April 6, 2012, Roelof Wobben wrote:

> Op 5-4-2012 20:29, Danny Yoo schreef:
>
>> I start with this :
>>>
>>> aaaaa|
>>>
>>
>> Concretely, what does the editor world value look like at this point?
>> You're representing the state somewhat ambiguously.  Can you represent
>> the above in terms of (make-editor ... ...)?
>>
>>
>>
> Yes, (make-editor  aaaaaa    a  """)


This can't be, as make-editor can only take two strings.  The structure
definition of make editor is:

    (define-struct editor (pre post))

Where both pre and post are both strings.



>  now someone press 3 times the left key.
>>> So I have  aa/aaa
>>>
>>
>>

> rep has he value of aaaaa
> s has the value of a
> t has also the value of a.
>


You make the same conceptual mistake here.  This representation does not
fit the shape of the structure definition.


Go back and make sure you understand the data definition.  If you have
questions about it, please feel free to ask.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120406/c190ab7e/attachment-0001.html>

Posted on the users mailing list.