Created
May 2, 2012 04:22
-
-
Save jordanlewis/2573618 to your computer and use it in GitHub Desktop.
PFDS Binary Tree datatype
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed abstract class BinaryTree[+T] | |
case object BinaryTreeLeaf extends BinaryTree[Nothing] | |
final case class BinaryTreeNode[T](left: BinaryTree[T], value: T, right: BinaryTree[T]) extends BinaryTree[T] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment