How about zipMap = zipWith ($)
- Conal
-Original Message-
From: Eric Allen Wohlstadter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 6:19 PM
To: [EMAIL PROTECTED]
Subject:zips and maps
I find myself very often needing to use this function and was won
Eric Allen Wohlstadter writes:
> I find myself very often needing to use this function and was wondering if
> there was already a way to do this using zip,maps, and folds.
>
> zipMap::[a->b]->[a]->[b]
> zipMap [] _ = []
> zipMap _ [] = []
> zipMap (f:fs) (x:xs) = (f x):(zipMap fs xs)
>
Eric Allen Wohlstadter wrote:
>
> I find myself very often needing to use this function and was wondering if
> there was already a way to do this using zip,maps, and folds.
Do you mind using zipWith? How about
zipMap = zipWith ($)
..?
-- Mieszko
_
I find myself very often needing to use this function and was wondering if
there was already a way to do this using zip,maps, and folds.
zipMap::[a->b]->[a]->[b]
zipMap [] _ = []
zipMap _ [] = []
zipMap (f:fs) (x:xs) = (f x):(zipMap fs xs)
Alternatively I can get the same affect like this:
fstOn
>I was wondering if anyone knew if there was going to be a summer school on
>functional programming this year. Also, where would I find information
>about it? Thanks.
I don't think a summer school on advanced functional programming will be
organised this year. Maybe next year, but as far as I kno