A simple use of "case"
An example od Defensive Programming (which is bad)
Calculates the length of a list using tail recursion and pattern matching
Calcutaes the length of a List using Tail recursion and a Case Expression
Returns the item at a specified index in a list, using Tail Recursion and Pattern Matching
The exit clause can be specified as the last one, if a when clause is used in Pattern Matching