4 ms·
Even for string? Why not define a LinkedList constant?
by lonelappde 7y ago
Even for string?
Why not define a LinkedList constant?
- carry_bit 7y agoYes, in WL strings are commonly used in a matter similar to enums in other languages. The thing to keep in mind is that WL is based on symbolic replacement. You normally wouldn't define that kind of function as taking in a parameter (i.e., CreateDataStructure[x_] := ...), rather you'd define it for each case separately (i.e., CreateDataStructure["LinkedList"] := ...).