Skip to content

Instantly share code, notes, and snippets.

@kennetpostigo
Created June 22, 2018 23:24
Show Gist options
  • Save kennetpostigo/3d2f7a303e99f73fdb196d8efb5264d2 to your computer and use it in GitHub Desktop.
Save kennetpostigo/3d2f7a303e99f73fdb196d8efb5264d2 to your computer and use it in GitHub Desktop.
Reason Blog Post min
let rec min = node =>
switch (node) {
| Empty => Empty
| Node({value, left, right}) =>
if (left == Empty) {
node;
} else {
min(left);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment