[plt-scheme] help with higher order functions
No, no. The foldr was chosen for a specific reason and I (as a co-
author of the paper) should have remembered the obstacle.
On Mar 18, 2009, at 1:42 PM, Anthony Cowley wrote:
> On Wed, Mar 18, 2009 at 12:17 PM, Matthias Felleisen
> <matthias at ccs.neu.edu> wrote:
>>
>> Yes. (My foldr was a step toward typing it with the new ... types
>> but that
>> didn't work.)
>>
>>
>
> This may be related to the bug Sam fixed yesterday. I thought this
> would work:
>
> #lang typed-scheme
>
> (: add-lists ((Listof Number) * -> (Listof Number)))
> (define (add-lists . lsts)
> (apply map + lsts))
>
> (add-lists '(1 2 3) '(4 5 6) '(7 8 9))
>
> Anthony