#lang typed/racket/base ;; Inputs (define-type (Stream D) (U (Datum D) 'Nothing 'EOS)) (struct: (D) Datum ([iota : D]))
;; Iteratee (define-type (Iteratee D A) (U (Done D A) (Continuation D A))) (struct: (D A) Done ([accum : A] [stream : (Stream D)])) (struct: (D A) Continuation ([resume : ((Stream D) -> (Iteratee D A))])) 1. How can I get the recursive nature of Iteratee and Continuation to type check? 2. Ideally, but not necessary, like to define Continuation as a define-struct/exec: Thanks, Ray
____________________ Racket Users list: http://lists.racket-lang.org/users