[plt-scheme] Re: Typed Scheme: Is there any easy way around this?

From: Matthew Swank (akopa.gmane.poster at gmail.com)
Date: Thu May 31 00:13:39 EDT 2007

On Wed, 30 May 2007 22:47:20 -0400, Sam TH wrote:

> Try this:
> 
> (pdefine: (a b) (mappend (fun : (a -> (Listof b))) (lst : (Listof a)))
> : (Listof b)
>     ;;Append the results of calling fn on each element of list.
>    (apply #{append :: ((Listof b) .. -> (Listof b))} (map fun lst)))
> 
> Basically, we explicitly instantiate append at the type b.
> 
> Hope that helps, and thanks for trying Typed Scheme!

I like it so far.  It is a bit verbose, however.  Are there any
plans to support type inference?


Matt
-- 
"You do not really understand something unless you can
 explain it to your grandmother." - Albert Einstein.




Posted on the users mailing list.