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

Lazy, section 3.4.2 #48

Open
mikkka opened this issue Jul 13, 2017 · 0 comments
Open

Lazy, section 3.4.2 #48

mikkka opened this issue Jul 13, 2017 · 0 comments

Comments

@mikkka
Copy link

mikkka commented Jul 13, 2017

After adding following code to example(cvs.scala, object Main) I've got java.lang.StackOverflowError

  sealed trait Tree[A]
  case class Branch[A](left: Tree[A], right: Tree[A]) extends Tree[A]
  case class Leaf[A](value: A) extends Tree[A]
  val tree1 = Branch(
    Branch(Leaf(1), Leaf(2)),
    Branch(Leaf(3), Leaf(4))
  )
  val tree2 = Branch(
    Branch(Leaf(21), Leaf(22)),
    Branch(Leaf(23), Leaf(24))
  )

  println("Trees as CSV:\n" + writeCsv(List(tree1, tree2)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant