Adding a Haskell solution to Homework 6, by flebron on edX, fedelebron on GitHub. :)

It requires the modules Math.Combinat.Partitions and Numeric.LinearAlgebra, available from the combinat and hmatrix packages on cabal, respectively.