Is there a way to make a struct that can seamlessly pretend to be a channel
the same way one can pretend to be an output-port?  I'm pretty sure the
answer is no but wanted to confirm.


(struct person (name to) #:property prop:output-port (struct-field-index
(displayln "yay" (person 'bob (current-output-port)) )
"yay"  ;<==== actual result

(struct animal (name to) #:property ??? (struct-field-index to))
(define fido (animal 'dog (make-channel)))
(channel-put fido 'yay)
(channel-get (animal-to fido))
'yay  ; <=== desired result

Is there something that can go in ??? to make this work, or some other way
of doing it?  I looked at impersonators but those don't seem to be it.

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To view this discussion on the web visit

Reply via email to