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

Reply via email to