by makecheck · 7y ago · 0 comments
This is a very common thing to write. Why couldn’t a switch avoid all keywords and look more like a list...such as:
?(value):
- 0: { doThing(); }
- 1: { otherThing(); }
- *: { doDefault(); } f 0 = doThing
f 1 = otherThing
f _ = doDefault