Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
object Zhihu37118044 {
def printDeep(vector: IndexedSeq[_]) {
import scalaz.std.indexedSeq._
import scalaz.syntax.traverse._
((0 until 100):IxSq[Int]).foldLeftM[IxSq, Any](vector) {
case (vector: IxSq[Any], _) =>
vector
case (value: Any , _) =>
println(value)
Vector.empty
}
}
def main(arguments: Array[String]): Unit = {
printDeep(
Vector(
Vector(
Vector(
Vector("000"), Vector("001")
),
Vector(
Vector("010"), Vector("011")
)
),
Vector(
Vector(
Vector("100"), Vector("101")
),
Vector(
Vector("110"), Vector("111")
)
)
)
)
}
}
@Atry

This comment has been minimized.

Copy link
Owner Author

@Atry Atry commented Nov 3, 2015

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.