-- returns the last element of a list
last :: [a] -> a
last [a] = a
last [a,b] = b
last [a,b,c] = c
last [a,b,c,d] = d

