[racket] on-key question

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Mar 15 17:41:51 EDT 2012

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


Posted on the users mailing list.