Skip to content

Instantly share code, notes, and snippets.

@debasishg
Created March 14, 2013 17:05
Show Gist options
  • Select an option

  • Save debasishg/5163116 to your computer and use it in GitHub Desktop.

Select an option

Save debasishg/5163116 to your computer and use it in GitHub Desktop.
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_43).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import scalaz._
import scalaz._
scala> import Scalaz._
import Scalaz._
scala> val m: List[List[String]] = List(List("a", "b"), List("c", "d"))
m: List[List[String]] = List(List(a, b), List(c, d))
scala> m.sequence
res0: List[List[String]] = List(List(a, c), List(a, d), List(b, c), List(b, d))
scala> val l: Seq[List[String]] = Seq(List("a", "b"), List("c", "d"))
l: Seq[List[String]] = List(List(a, b), List(c, d))
scala> l.sequence
<console>:15: error: could not find implicit value for parameter F0: scalaz.Traverse[Seq]
l.sequence
^
<console>:15: error: value sequence is not a member of Seq[List[String]]
l.sequence
^
scala>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment