enum BinaryTree[+A]

An enum for binary trees with an element at each node.

Example: Node(1, Node(2, Empty, Empty), Empty)

The Node and Empty constructors are exported so they can be referred with or without the BinaryTree. prefix, as in BinaryTree.Node.

trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Type members

Enum entries

case Empty extends BinaryTree[Nothing]
case Node[+A](item: A, left: BinaryTree[A], right: BinaryTree[A])