What's the best approach to:

+ defining a class whose instances can be used as procedures?

(define ci (new proc-class%))
(ci arg arg2 ... )

+ ... whose instances can be used as lists (or at least support direct 
iteration?)

(define li (new listish-class%))
(for-each displayln li)
(map ci li)

My intuition is "implement a generic interface..." But then it gets hazy. 




____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to