wren ng thornton wrote:
> concat1 :: T a b -> (b -> T a b) -> T a b
This could just as easily be
concat :: T a b -> (b -> T a c) -> T a c
right? It's a little weird to call this concatenation, but I bet it
could come in
miring. The natural numbers extended with
infinity is one example (if you don't take 0*x = 0 as an axiom, I think
there are two possibilities for 0*∞).
--
Jason McCarty
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
(\h t -> flip f h >=> t) return xs
depending on the monad. But they're both slower than foldM.
> foldr1M f (x:xs) = foldrM f x xs
> -- foldlM nests to the left:
> -- foldlM f z [x1, ..., xn] = (...(flip f x1) >=> ..