3 ms·
Because `def` suggests there is only one kind of thing we're defining (functions), when we could be defining any number of things: functions, type aliases, alge
by skrishnamurthi 5y ago
Because `def` suggests there is only one kind of thing we're defining (functions), when we could be defining any number of things: functions, type aliases, algebraic datatypes, tests, etc. So we use `fun` for functions, and different keywords (e.g., `examples` for examples) for other things. You should really be questioning why `def` was used for functions.