Skip to content

Instantly share code, notes, and snippets.

@michiakig
Created February 11, 2013 01:23
Show Gist options
  • Save michiakig/4751868 to your computer and use it in GitHub Desktop.
Save michiakig/4751868 to your computer and use it in GitHub Desktop.
- val tree = Node("a",Node("b",Leaf,Leaf),Node("c",Leaf,Leaf));
val tree = Node ("a",Node ("b",Leaf,Leaf),Node ("c",Leaf,Leaf)) : string tree
- printTree tree;
a
/ \
b c
val it = () : unit
- val tree' = Node("x",Node("y",Leaf,Leaf),Node("z",Node("q",Leaf,Leaf),Node("w",Leaf,Leaf)));
val tree' =
Node
("x",Node ("y",Leaf,Leaf),
Node ("z",Node ("q",Leaf,Leaf),Node ("w",Leaf,Leaf))) : string tree
- printTree tree' ;
x
/ \
y z
/ \
q w
val it = () : unit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment