An Ising model in Haskell