Skip to content

Instantly share code, notes, and snippets.

@kennetpostigo
Created June 22, 2018 22:45
Show Gist options
  • Save kennetpostigo/3a6f7331d9fff9192c8c70a95bfde578 to your computer and use it in GitHub Desktop.
Save kennetpostigo/3a6f7331d9fff9192c8c70a95bfde578 to your computer and use it in GitHub Desktop.
Reason BST Modeling for Blog Post
type binarySearchTree('a) =
| Empty
| Node(node('a))
and node('a) = {
value: 'a,
left: binarySearchTree('a),
right: binarySearchTree('a),
};
let empty = Empty;
let bst = Node({value: 1, left: Empty, right: Empty});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment