Skip to content

Instantly share code, notes, and snippets.

@bpatra bpatra/gist:6074329
Last active Dec 20, 2015

Embed
What would you like to do?
Using the mutable tree and its mergeInto function introduced ingist:6074217
let tree = ref Tree.Empty
let branch1 = ["a";"b";"c"]
let branch2 = ["a";"b";"d"]
let branch3 = ["a";"f"]
do mergeInto tree branch1
do mergeInto tree branch2
do mergeInto tree branch3
//the following tree is created
// a
// / \
// f b
// / \
// d c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.