Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #use "graphes.ml"
- (* Alias pour les fonctions provenant de graphes.ml *)
- let estBut x = estBut1 x ;;
- (* let estBut x = estBut1bis x ;; *)
- (* let estBut x = estBut1ter x ;; *)
- let etatsSuivants x = etatsSuivants1 x ;;
- let rec print_list_string = function
- | [] -> print_string ".\n";
- | t :: q -> print_string t; print_string " "; print_list_string q;;
- let rec profondeurBeta queue = match queue with
- | [] -> failwith "Aucun but trouvé"
- | t :: q -> if (estBut t)
- then t
- else profondeurBeta ((etatsSuivants t) @ q) ;;
- profondeurBeta ["A"];;
- print_list_string [ "Aa" ; "BBb" ; "C" ; "D" ];;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement