Re: [Haskell-cafe] Data.Enumerator.List.concatMap is to Data.Iteratee.?

2011-06-27 Thread John Lato

 From: David Place d...@vidplace.com

 Hi:

 I've been studying iteratee IO.  Is there a function in the iteratee
 package  that is analogous to Data.Enumerator.List.concatMap?


Iteratee's 'Data.Iteratee.Iteratee.convStream', or the more general
'Data.Iteratee.Iteratee.unfoldConvStream', would be the rough equivalents.
 The difference is that DEL.concatMap operates on each chunk, whereas
DII.convStream operates on the stream.  This makes it possible to specify
operations which work on multiple chunks.

If you want a function more like DEL.concatMap, it would be

 concatMap f = convStream (fmap f getChunk)

Note that stream type 's' in enumerator should generally be translated to
'[s]' in iteratee.

John
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Data.Enumerator.List.concatMap is to Data.Iteratee.?

2011-06-26 Thread David Place
Hi:

I've been studying iteratee IO.  Is there a function in the iteratee package  
that is analogous to Data.Enumerator.List.concatMap?


David Place   
Owner, Panpipes Ho! LLC
http://panpipesho.com
d...@vidplace.com




___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe