Guest User

Untitled

a guest
Jan 4th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.33 KB | None | 0 0
  1. let rec raices = function
  2.             [] -> []
  3.         |   Vacio::t -> raices t
  4.         |   (Nodo(r,_,_))::t -> r::(raices t);;
  5.  
  6.  
  7. let rec nodos = function
  8.             [] -> []
  9.         |   Vacio::t -> nodos t
  10.         |   (Nodo(_,izq,der) -> izq::der::(nodos t);;
  11.  
  12. let anchura a =
  13.         let rec aux = function
  14.                 [] -> []
  15.             |   l -> (raices l)@(aux(nodos l))
  16.         in aux[a];;
Add Comment
Please, Sign In to add comment