[racket] message passing
Hello schemers
what if I have program of massage passing and I have to return the object when it is defined.
example-
(define (single-order)
(let (
(delivery #f)
)
(define (the-order req)
(cond ((eq? req 'available) available)
(else (error "the-order: unknown req: " req))
)
)
(define (available)
(set! delivery #t))
the-order
)
)
(define (available object)
((object 'available)))
=> now when I will run it like
(define mcdon(single-order))
- it should return mcdon instead of <#unspecified>
Any ideas??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100808/8269900e/attachment.html>