[racket] message passing

From: iam_here at aol.in (iam_here at aol.in)
Date: Sun Aug 8 13:20:24 EDT 2010

Hello schemers

what if I have program of massage passing and I have to return the object when it is defined.

(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))


(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>

Posted on the users mailing list.