Guest User

Untitled

a guest
Sep 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. (define (root msg)
  2. (let ([slots (make-hash)])
  3. (hash-set! slots 'responds-to (λ() (hash-keys slots)))
  4. (hash-set! slots 'make-slot (λ (key value) (hash-set! slots key value)))
  5.  
  6. (hash-set! slots 'clone
  7. (λ(msg) (let ([slots (hash-copy slots)]) (hash-ref slots msg))))
  8.  
  9. (hash-ref slots msg)))
Add Comment
Please, Sign In to add comment