Advertisement
juaniisuar

ej 3 p2

Apr 7th, 2016
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 0.40 KB | None | 0 0
  1. (define (tecla n x) (cond
  2.                       ((and (= (string-length n) 0) (key=? x "\b")) n)
  3.                       ((key=? x "\b") (substring n 0 (- (string-length n) 1)))
  4.                       (else (string-append n x)  )))
  5. (define (pantalla n) (place-image/align (text n 20 "indigo") 0 0 "left" "top" (empty-scene 800 60)))
  6. (big-bang ""
  7.           [to-draw pantalla]
  8.           [on-key tecla])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement