Hacker News new | ask | show | jobs
by ivanjermakov 618 days ago
Hmm, is there OCaml equivalent of Haskell's `succ`[1], which is inplemented for all sum types deriving `Enum`?

It would simplify these two functions to just `succ` and `pred`

[1]: https://hackage.haskell.org/package/base-4.20.0.1/docs/GHC-E...