[Haskell-cafe] Is this haskelly enough?
J. Garrett Morris
trevion at gmail.com
Wed Jul 18 13:47:37 EDT 2007
This is probably just me, but I've always mentally separated the list
monad (representing choice) from operations on ordered sets
implemented by lists (which don't always have to represent choice).
In this case, since the remainder of the code wasn't monadic, I find
it much easier to understand what concatMap (or concat . map if you
don't like the merged function) does than what (>>= tails) would do.
/g
On 7/18/07, Miguel Mitrofanov <miguelimo38 at yandex.ru> wrote:
> DFP> Yes, but that generality is entirely wasted here and thus an
> DFP> obscuring element. There is no way that this function can be
> DFP> generalized to work with other monads.
>
> As for me, concatMap (and concat.map as well) seems much more
> obscuring. (>>=) is so general, that I use it almost everywhere, but
> I have to dig into my memory to remember concatMap (or is it
> mapConcat?)
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
--
The man who'd introduced them didn't much like either of them, though
he acted as if he did, anxious as he was to preserve good relations at
all times. One never knew, after all, now did one now did one now did
one.
More information about the Haskell-Cafe
mailing list