[plt-scheme] Re: Call for Participation: Writing Typed Scheme wrapper modules

From: harsha (harsha.v.r at gmail.com)
Date: Thu Feb 26 13:59:07 EST 2009

I started doing scheme/string, but ran into a difficulty when typing
Its argument list is a list of strings except the last element which
itself is a list of strings.
So the argument list has type (Listof* String)
(define-type-alias (Listof* Elt-type)
  (Rec T (U [Pair Elt-type T]
            [Pair (Listof Elt-type) '()])))

except that -> type constructor doesn't let you play with the argument
list directly, but the individual arguments,
of the 4 cases listed in the reference documentation for ->, cases 1
and 4 only allow finitely many arguments,
 but case 2 has a uniform rest argument, and case 3 is somewhat
confusing to me (as to what exactly the bound parameter is upto).

Posted on the users mailing list.