[Haskell-beginners] Haskell implementation of longest path algorithm