Multi-Set Manipulator/String
Jump to navigation
Jump to search
This is a string-based version of Multi-Set Manipulator/Subset, as there are programming difficulties for using lists.
This attempts to make Multi-Set Manipulator a pure set-based language. All sets in Set Manipulator are multi-sets, although they can occasionally be treated as normal sets.
Set-manipulational instructions
A∩B A with all items not in B removed; Intersection A∪B A appended with B; Union «I Make the I set's items exclusive. AΔB (A-B)∪(B-A) A\B A with all B items removed "ABC" Define a set I The set that results from 1 line of input; all expressions are outputted by default. ← Initializement; for all of the undefined variables it searches for where that variable is in the program and then evaluates that variable's expression first. The initialized value will be returned. = Equivalency symbol ¶ Separate lines ∴ expression∴action; conditional statement
Set-comparison instructions
∈ ELEMENT OF ∉ NOT AN ELEMENT OF ⊂ STRICT SUBSET OF ⊆ SUBSET OF OR EQUAL TO
Built-in sets
Z Is the set a positive integer? "\x01\x02\x03\x04\x05\x06..." P Prime number set; "\x02\x03\x05\x07\x0B\x0D..." ∅ Null set; "" U Universal set; "\x00\x01...\xFE\xFF"
Proof as a programming language
Primality checker
I∈P
Unary Adder
I∪I
Exchange "Good" and "Bad"
"GoodBad"\I
Output with the same length as the code
A←"aaaa"¶A∪A
Create output twice the length as the code
It is impossible... here is an approximate one.
A←"aaaa"¶A∪A∪A∪A∪A∪A∪A∪A∪A∪A∪A∪A∪A∪A∪A∪A∪A∪A
Shortest code to produce infinite output
A←"H"∪A
Is it double speak?
A←I=A\«A
Code page
_0_1_2_3_4_5_6_7_8_9_A_B_C_D_E_F 0_ ∩ ∪ « Δ \ " ← = ¶ ∈ ∉ ⊂ ⊆ ∅ Z P 1_ A I U E ∴