Guest User

Untitled

a guest
Jan 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. type tree = Node of string * exp * tree * tree | Empty
  2.  
  3. and exp = Etree of tree | EInt of int | List of (string*exp);;
  4.  
  5. let rec evalNode.......
  6.  
  7.  
  8.  
  9. and rec eval (e:exp) =
  10. (match e with
  11. | EInt _ -> e
  12. | Etree(tree) -> (match tree with
  13. | Empty -> []
  14. | Node(s,i,t1,t2) -> (evalNode (tree)) )
  15.  
  16. )
Add Comment
Please, Sign In to add comment