[plt-scheme] Re: function contracts

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sun Mar 14 17:37:28 EST 2004

At Sun, 14 Mar 2004 13:39:55 -0800, David Van Horn wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> Robby Findler wrote:
> > I've just added a new contract combinator called ->r (r for "related"
> > as in "the arguments are related to each other").
> Thanks, this has made my contract code much more legible.

FWIW, this combinator is more expensive than the regular -> one, so you
should probably stick with the -> when possible.

> It seems natural to have such a combinator that enforced a relation on 
> multiple return values as well, or is there an easy way to do this with 
> the current system?

Again, not currently possible, but something I do plan to get to for
the ->r combinator, when I get some time. Same thing for an ->r
variation that preserves tail recursion by avoiding result checks.


Posted on the users mailing list.