Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.29 KB | None | 0 0
  1. let combinaisons k l =
  2.   let l_triee = List.sort compare l in
  3.     let rec combinaisons_aux k l =
  4.       match (l,k) with
  5.       | ([], 0) -> top
  6.       | ([], _) -> bot
  7.       | (t::q,k) -> node((combinaisons_aux k q), t, (combinaisons_aux (k-1) q))
  8.     in combinaisons_aux k l_triee
  9. ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement