Low-rank matrix recovery algorithm in Haskell