[plt-scheme] Higher-order contracts for variable-arity functions

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Fri May 26 11:24:41 EDT 2006

On 5/26/06, Robby Findler <robby at cs.uchicago.edu> wrote:
> After thinking a little more about this, I think you're right and I
> also think that this suggests that ->* is done wrong. The listof in the
> second argument should have been implicit.
> I'll try to find some time in the not too distant future to try this
> all out and figure how to change the contract library.

I think both ways are useful.  Not every variable-arity function is
uniform in its arguments.  The "galore.plt" library in PLaneT
currently has some variable-arity functions whose arguments alternate
in their "type".  Other functions might require nondecreasing numeric
arguments, and so forth.  So sometimes you want to have an arbitrary
flat contract on the entire list; other times you want a higher-order
contract applied uniformly.

Carl Eastlund
"Cynical, but technically correct."

Posted on the users mailing list.