We will do the 8-Quene problem today.
Some syntax sugar first.
The followings are equivalent:
putStrLn (show (1 + 1)) putStrLn $ show $ 1 + 1 putStrLn . show $ 1 + 1
$ sign is used to avoid parenthesis. Whatever on the right of it takes precedence.
. sign is used to chain functions. The output of RHS will be the input of LHS.
And here is a very good place to lookup useful functions in the Prelude module of Haskell. http://hackage.haskell.org/package/base-220.127.116.11/docs/Prelude.html