[racket] on-key question
did you test and run?
On Mar 15, 2012, at 5:29 PM, Roelof Wobben wrote:
> 2. Define a key-handler function
>> This is what I made :
>>
>> ; AllKeys String -> AllKeys
>> ; add ke to w, the state of the world
>> (define (key-handler w ke)
>> (cond
>> [ (key=? ke "\t") w]
>> [ (key=? ke "\r") w]
>> [ (key=? ke " ") w]
>> [ (key=? ke "\b") w]
>> [ (>( string-lenght ke) 1) w
>> [else (string-append w ke)]))
>>
>
> No more remarks or learning points.
>
> Roelof
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users