This file contains 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
module BinaryTree | |
where | |
-- Haskell Binary Tree Examples | |
-- A binary tree can either be empty or a node with a left and right branch | |
data Tree a = EmptyTree | Node a (Tree a) (Tree a) | |
deriving ( Show, Read, Eq ) |