klequis / zz-haskell-notebook

Notes from learning Haskell
1 stars 0 forks source link

Partial functions #21

Open klequis opened 2 years ago

klequis commented 2 years ago

Partial functions: I got this from here. It says that partial functions (not partial application) are functions that do not have a pattern match for all possible cases. An example is head. head does not have a case for [] and will throw an exception. Such functions should return an error using error.