Project Euler #15 in haskell
There's no need to list all the moves.  Here is an unmemoized solution:

naiveWays :: Position -&gt; Int
naiveWays (Position 0 _) = 1
naiveWays (Position _ 0) = 1
naiveWays (Position x y) = (naiveWays (Position (x - 1) y)) +
                           (naiveWays (Position x (y - 1)))


Note that it also takes better advantage of pattern matching.