Haskell with matrix simulation.