Quantcast
Channel: Active questions tagged ocaml - Stack Overflow
Viewing all articles
Browse latest Browse all 594

Computing a set of all subsets (power set)

$
0
0

I am trying to get a function (given as a parameter a set) to return a set whose elements are all the subset formed from the main set.Ex: {1;2;3} -> { {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} }

But I don't exactly know how to make a module that lets me work with a set of sets. What type should I define it as?


Viewing all articles
Browse latest Browse all 594

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>