Post History
Natural to set (set meaning an unordered collection with no duplicates, though answers may use and output lists instead) Recently I was brainstorming what a language with only (arbitrarily nested...
#1: Initial revision
Make my number a set
## Natural to set (set meaning an unordered collection with no duplicates, though answers may use and output lists instead) Recently I was brainstorming what a language with only (arbitrarily nested) sets would be like. A number is represented with a set of that many elements. The elements need to be different, which leads to this definition: # Definition - The set representation of \$0\$ is the empty set. - The set representation of any other integer \$n\$ is the set of the set representations of all positive integers less than \$n\$, including zero. - Negative, complex, or rational numbers do not need to be handled. - Your full program or function is to convert from a positive integer to a set or list. ## Examples ``` 0 {} 1 {{}} 2 {{}, {{}}} 3 {{}, {{}}, {{}, {{}}}} ```