- 
                Notifications
    You must be signed in to change notification settings 
- Fork 29
Closed
Description
I had expected that S.map and fmap would work the same. E.g., to my mind these should have been equivalent:
x = S.map (+1) $ S.each [1..10]
x' = fmap (+1) $ S.each [1..10] -- this gives a compiler errorBecause that's what happens to lists with map and fmap. Instead fmap only affects the result of the stream.
Similarly, with the Applicative instance:
y = S.zipWith (/) (S.each [1..10]) (S.each [2..11])
y' = (/) <$> S.each [1..10] <*> S.each [2..11] -- this gives a compiler errorWhat is the motivation behind such an implementation? There's certainly a downside for me here since, it seems, I can't have a general function working on Functors that would do the same thing for lists and streams.