iteratee Iteratee Digest, Vol 1, Issue 4
Ben
midfield at gmail.com
Sat Aug 14 20:20:58 EDT 2010
A suggestion for Data.Iteratee.ListLike :
mapStreamM :: (Monad m) =>
(el -> m el')
-> Enumeratee [el] [el'] m a
mapStreamM mf = eneeCheckIfDone (liftI . step)
where
step k (Chunk xs)
| LL.null xs = liftI (step k)
| otherwise = joinIM $ do ys <- mapM mf xs
return $ mapStreamM mf $ k (Chunk ys)
step k s = idone (liftI k) s
an improvement would be something that actually uses the ListLike
class (or some monadic extension of it.)
B
On Sat, Aug 14, 2010 at 5:11 PM, <iteratee-request at projects.haskell.org> wrote:
> Send Iteratee mailing list submissions to
> iteratee at projects.haskell.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://projects.haskell.org/cgi-bin/mailman/listinfo/iteratee
> or, via email, send a message with subject or body 'help' to
> iteratee-request at projects.haskell.org
>
> You can reach the person managing the list at
> iteratee-owner at projects.haskell.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Iteratee digest..."
>
>
> Today's Topics:
>
> 1. darcs patch: Bump testing dependencies to avoid
> mixed-dependencies ... (Edward Z. Yang)
> 2. Where is >>== and other combinators? (Edward Z. Yang)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 14 Aug 2010 19:09:49 -0400 (EDT)
> From: "Edward Z. Yang" <ezyang at MIT.EDU>
> Subject: iteratee darcs patch: Bump testing dependencies to avoid
> mixed-dependencies ...
> To: iteratee at projects.haskell.org
> Message-ID: <201008142309.o7EN9nOY002337 at outgoing.mit.edu>
> Content-Type: text/plain; charset="us-ascii"
>
> Sat Aug 14 16:09:20 PDT 2010 Edward Z. Yang <ezyang at mit.edu>
> * Bump testing dependencies to avoid mixed-dependencies problem.
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: text/x-darcs-patch
> Size: 27469 bytes
> Desc: A darcs patch for your repository!
> Url : http://projects.haskell.org/pipermail/iteratee/attachments/20100814/89643a65/attachment-0001.bin
>
> ------------------------------
>
> Message: 2
> Date: Sat, 14 Aug 2010 20:11:48 -0400
> From: "Edward Z. Yang" <ezyang at MIT.EDU>
> Subject: iteratee Where is >>== and other combinators?
> To: iteratee <iteratee at projects.haskell.org>
> Message-ID: <1281831018-sup-3395 at ezyang>
> Content-Type: text/plain; charset=UTF-8
>
> In his DEFUN08 talk notes [1], Oleg introduces a number of combinators
> for handling iteratees. The one I noticed, in particular, that was missing
> was the >>== combinator, which is analogous to monadic bind but in the
> vertical direction. I am curious to know if this was purposely omitted
> or just an oversight.
>
> Cheers,
> Edward
>
> [1] http://okmij.org/ftp/Haskell/Iteratee/IterateeIO-talk-notes.pdf
>
>
>
> ------------------------------
>
> _______________________________________________
> Iteratee mailing list
> Iteratee at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/iteratee
>
>
> End of Iteratee Digest, Vol 1, Issue 4
> **************************************
>
More information about the Iteratee
mailing list