purescript/purescript — pull request #274 by joneshf (2014-03-10 18:48:12+00:00)
Title: Added Data.Foldable and Data.Traversable to Prelude.

Couple of things.

* I tried to move all the specific functions like `Data.Array.foldr` into `Data.Foldable` and just make `Array` and instance of `Foldable` This will break a few libraries that depend on `Data.Array` having foldr and whatnot, so I'll update those as well.
* I'm unsure about `foldr1` and `foldl1`. If we're sticking to the "no partials" thing (which I'm behind) then should these have the type: `foldr :: forall a b f. (Foldable f) => (a -> b -> b) -> f a -> Maybe b` and `foldl :: forall a b f. (Foldable f) => (b -> a -> b) -> f a -> Maybe b`?
* I combined the `for`/`forM`, `traverse`/`mapM`, etc functions because we shouldn't support `Applicatives` and `Monads` having different semantics.