Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type tree = Node of string * exp * tree * tree | Empty
- and exp = Etree of tree | EInt of int | List of (string*exp);;
- let rec evalNode.......
- and rec eval (e:exp) =
- (match e with
- | EInt _ -> e
- | Etree(tree) -> (match tree with
- | Empty -> []
- | Node(s,i,t1,t2) -> (evalNode (tree)) )
- )
Add Comment
Please, Sign In to add comment