On 02/01/2013 05:21 AM, Michael Snoyman wrote:That is a good point, and I wanted to go that way, but was not sure it
> Firstly, what's the use case that you want to deal with lists? If it's
> for efficiency, you'd probably be better off using a Vector instead.
would help me a lot here. My use case is for services where there is a
"bulk" API, such as Redis pipelining or Elasticsearch bulk inserts. The
network round-trip gains would exceed by far those from a List to Vector
conversion.
I can see how to do singleton, but that would gain me ... singletons.
> But I think the inverse of `concat` is `singleton =
> Data.Conduit.List.map return`, or `awaitForever $ yield . return`, using
> the list instance for Monad. Your conduitMap could be implemented then as:
>
> conduitMap conduit = concat =$= conduit =$= singleton
That means I could not exploit a bulk API.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe