Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let all_combinations2 liste =
- let rec sub_comb2 courant sub_courant = match courant with
- [] -> []
- | (elt_courant::l_suivante) -> match sub_courant with
- [] -> []
- | [e] -> (elt_courant, e) :: sub_comb2 l_suivante l_suivante
- | e::l -> (elt_courant, e) :: sub_comb2 (elt_courant::l_suivante) l
- in
- sub_comb2 liste liste
- ;;
Add Comment
Please, Sign In to add comment