[Haskell-beginners] Another request for code critique...

Felipe Almeida Lessa felipe.lessa at gmail.com
Thu Mar 31 20:37:04 CEST 2011

On Thu, Mar 31, 2011 at 6:18 PM, Mike Meyer <mwm at mired.org> wrote:
> Shorter, but thing I've done that wasn't just an exercise from a
> haskell book.
> The problem statement can be found at
> http://kernelbob.wordpress.com/2011/03/20/same-five-digits/.
> My solution can be seen at http://pastebin.com/iW95q2ex.

Some quick comments:

- Instead of '(== 0) . M.size', use 'M.null'.
- Instead of 'putStrLn . show', use 'print'.
- Why do you use M.map (head . show)?  Why not stick with the numbers?



More information about the Beginners mailing list