Some numerical optimization methods implemented in Haskell