Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by lemonwaterlime

1 day ago

In Haskell, one would return a Maybe or an Either here.

    Maybe
    ——————
    Just hash
    Nothing

    Either
    ——————————
    Left err
    Right hash

The program would be designed around not allowing this failure mode to even be possible.

0 comments

lemonwaterlime

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities