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

From: Sam TH (samth at ccs.neu.edu)
Date: Thu Feb 26 15:25:11 EST 2009

This is a type that you cannot currently express in Typed Scheme.  It
might be in the future, but in the meantime you should write the most
expressive type you can for `string-append*'.  If there's no useful
type, make a note of that in the file, and don't handle
`string-append*'.

Thanks,
sam th

On Thu, Feb 26, 2009 at 1:59 PM, harsha <harsha.v.r at gmail.com> wrote:
> I started doing scheme/string, but ran into a difficulty when typing
> string-append*
> 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)
> where,
> (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).
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



-- 
sam th
samth at ccs.neu.edu


Posted on the users mailing list.