Skip to content

Lazy, section 3.4.2 #48

Description

@mikkka

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)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions