Guest User

Untitled

a guest
Dec 16th, 2017
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. type 'a ntree = Tr of 'a * 'a ntree list;;
  2.  
  3. let rec count = function
  4. Tr(x,lst) -> 1+(count_lst lst)
  5. and count_lst = function
  6. [] -> 0
  7. | el::rest -> count el + count_lst rest;;
Advertisement
Add Comment
Please, Sign In to add comment