Hacker News new | ask | show | jobs
by Koshkin 1615 days ago
> shitty code

Still, I have never understood why anyone would want to write

  if (success == true)
instead of

  if (success)
1 comments

Maybe both of those examples aren't great? Maybe you want something like this?

  case result of
    Error e -> -- some error handling code
    Ok a    -> -- the happy path