Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type 'a ntree = Tr of 'a * 'a ntree list;;
- let rec count = function
- Tr(x,lst) -> 1+(count_lst lst)
- and count_lst = function
- [] -> 0
- | el::rest -> count el + count_lst rest;;
Advertisement
Add Comment
Please, Sign In to add comment