First version of linear regression in Haskell