Comment by AdieuToLogic
14 hours ago
Better to use a type which cannot represent an invalid state.
For example, instead of defining `inc` with `Int`s, the equivalent of an `IncrementalInt` type parameter for the `inc` function will ensure correctness without requiring runtime assertions.
No comments yet
Contribute on Hacker News ↗