8 ms·
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 par
by g__ 17y ago
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.
- vito 17y agoYep. As I said, this is all pretty old and was done as a learning experience. Thanks though. :)