Functions like Piecewise
have cool, easy-to-read formatting. In the same vein, I think it would be wonderful if the Which
function automatically returned output in a column or tabulated form:
Which[a < b, 1,
c < d, 2,
True, 3]
rather than the what currently happens, which can sometimes be difficult to read.
Which[a < b, 1, c < d, 2, True, 3]
This example happens to be easy to read, but for Which
expressions with a large number of <condition, value>
pairs, it would be nice to have a structured layout for the output.
Any suggestions as to how to make this happen automatically?