g__'s comments

g__ | 15 years ago | on: Ask HN: What is a monad?

DON'T start functional programming with monads. Familiarize with currying, pattern matching, how to create data types in Haskell, using recursion instead of loops, higher order functions, list comprehensions, type classes, polymorphism in Haskell (different than subtyping in OOP). Ignore monads for a while. To understand monads you must have a good grip of those concepts. You can start with http://learnyouahaskell.com/chapters.

You'll see Haskell tutorials delay telling about the concept. There's a reason.

For a bird's eye of monads you can check this: http://www.reddit.com/r/programming/comments/64th1/monads_in...

If you are ready, read and do exercises in http://blog.sigfpe.com/2007/04/trivial-monad.html and then http://blog.sigfpe.com/2006/08/you-could-have-invented-monad....

g__ | 16 years ago | on: 9,73,241,561,1081,1849,_?_

You'd have to determine if a program halts. Unless you restrict to non-Turing-complete language, this is undecidable.

g__ | 16 years ago | on: Haskell Sudoku solver

and $ map can be shortened to all in many places.

I'd use pointless style more: row = (!!)

The function valid has a lot of repetition, maybe the repeating part can be abstracted of?

Instead of length possible > 0, you can use not $ null possible. This is faster, since it doesn't go through the whole list.

Instead of pattern matching on Maybe (tile), you can use Prelude's maybe.

page 1