[plt-scheme] mutual recursion in contracts

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat May 8 23:38:54 EDT 2004

At Sat, 8 May 2004 23:12:22 -0400, David Herman wrote:
> > And there is one. flat-murec-contract.
> Oops, missed that. But it still requires that at the time of using 
> flat-murec-contract I know all of the forms that might be mutually 
> recursive. If I want to be able to have multiple expressions that use 
> my macro and that are mutually recursive, I can't use a construct like 
> that.
> If I were only working with flat-contracts and/or predicates, I could 
> use eta-expansion (in conjunction with flat-contract-predicate), so the 
> contract expressions could be immediately evaluated, but wouldn't 
> actually be used until they had all been defined.
> But with h.o. contracts I don't know of a solution.

Recursive ho contracts gets tricky. I'm not sure how to do them in the
general case, either.

Perhaps if you supply some detail of the particular contracts I can
suggest something or maybe add something to the library to help.


Posted on the users mailing list.