3 ms·
F# solves this by making it a compile error to fail to consume an expression that returns anything other than unit. If you really must do this, you normally use
by Smaug123 6y ago
F# solves this by making it a compile error to fail to consume an expression that returns anything other than unit. If you really must do this, you normally use `ignore : 'a -> unit`. It's unidiomatic F# to structure your APIs in such a way that you will routinely throw away the information you're given.
- Gibbon1 6y agoI think really what people want are strict and sleazy compile options. Or better the ability to tell the compiler that a return value is an error. Or not. If it's not an error and it gets tossed who cares really. Sometimes you don't care if every i is dotted and every t crossed.