Permalink
Browse files

Fixed issue reported: http://stackoverflow.com/questions/2682487/comp…

  • Loading branch information...
1 parent 9d484d4 commit 26455f09ebecd723e60b8056e83d6c9db974eb75 @retronym retronym committed Apr 22, 2010
View
7 core/src/main/scala/scalaz/Scalaz.scala
@@ -138,8 +138,11 @@ object Scalaz extends ScalazLow
implicit def MapEntryMA[X, A](e: Entry[X, A]): MA[PartialApply1Of2[Entry, X]#Apply, A] = ma[PartialApply1Of2[Entry, X]#Apply, A](e)
- // Seq[A] implements Function1[Int, A]. Without this, Function1FlipMA would be used.
- implicit def SeqMA[M[_] <: Seq[_], A](l: M[A]): MA[M, A] = ma[M, A](l)
+ // Seq[A] implements Function1[Int, A]. Without this, Function1ApplyMA would be used.
+ implicit def SeqMA[M[X] <: Seq[X], A](l: M[A]): MA[M, A] = ma[M, A](l)
+
+ // Set[A] implements Function1[Int, B]. Without this, Function1ApplyMA would be used.
+ implicit def SetMA[M[X] <: Set[X], A](s: M[A]): MA[M, A] = ma[M, A](s)
implicit def KleisliMA[M[_], A, B](k: Kleisli[M,A,B]): MA[PartialApplyKA[Kleisli, M, A]#Apply, B] = ma[PartialApplyKA[Kleisli, M, A]#Apply, B](k)
View
2 example/src/main/scala/scalaz/example/ExampleFold.scala
@@ -36,6 +36,8 @@ object ExampleFold {
// which lazily handles the infinite Stream.
(Stream.continually(1) ∃ (_ > 0)) assert_≟ true
+ Set(1, 2, 3) ∃ { _ % 2 == 0 } assert_≟ true
+
// Checking if all elements satisfy a predicate, using Stream FoldRight,
// which lazily handles the infinite Stream.
(Stream.continually(1) ∀ (_ == 0)) assert_≟ false

0 comments on commit 26455f0

Please sign in to comment.