Skip to content

Instantly share code, notes, and snippets.

@hardentoo
hardentoo / binaryTrees.hs
Created April 25, 2018 01:20 — forked from owainlewis/binaryTrees.hs
Haskell BTree
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 )