Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include VectorInstances and ToVectorOps to import Scalaz._ #151

Merged
merged 1 commit into from Sep 19, 2012

Conversation

Projects
None yet
2 participants
@eed3si9n
Copy link
Contributor

eed3si9n commented Sep 19, 2012

steps

Currently Vector instances and functions are not brought in with import Scalaz._.

scala> import scalaz._
import scalaz._

scala> import Scalaz._
import Scalaz._

scala> Vector(1, 2) >>= { x => Vector(x + 1)}
<console>:14: error: could not find implicit value for parameter F0: scalaz.Bind[scala.collection.immutable.Vector]
              Vector(1, 2) >>= { x => Vector(x + 1)}
                    ^

scala> Vector(1, 2) filterM { x => Vector(true, false) }
<console>:14: error: value filterM is not a member of scala.collection.immutable.Vector[Int]
              Vector(1, 2) filterM { x => Vector(true, false) }
                           ^

what this implements

Why not bring them in?

scala> import scalaz._
import scalaz._

scala> import Scalaz._
import Scalaz._

scala> Vector(1, 2) >>= { x => Vector(x + 1)}
res0: scala.collection.immutable.Vector[Int] = Vector(2, 3)

scala> Vector(1, 2) filterM { x => Vector(true, false) }
res1: scala.collection.immutable.Vector[Vector[Int]] = Vector(Vector(1, 2), Vector(1), Vector(2), Vector())

larsrh added a commit that referenced this pull request Sep 19, 2012

Merge pull request #151 from eed3si9n/topic/vectorinstance
include VectorInstances and ToVectorOps to import Scalaz._

@larsrh larsrh merged commit 38e5616 into scalaz:scalaz-seven Sep 19, 2012

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.