klequis / zz-haskell-notebook

Notes from learning Haskell
1 stars 0 forks source link

Bottom #63

Open klequis opened 2 years ago

klequis commented 2 years ago

Bottom is a non-value used to denote that the program cannot return a value or result. The most elemental manifestation of this is a program that loops infinitely. Other forms can involve things like writing a function that doesn’t handle all of its inputs and fails on a pattern match. (Haskell First Principals)

Expressions that result in some kind of a run-time error, such as 1/0, also have this value. Such an error is not recoverable: programs will not continue past these errors. (A Gentle Introduction to Haskell)