Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
@FrankK
Haskell Translation added
Please review.. :)
Note: The clues here are in a 2d list of lists instead of a 1d list, like in other languages. I did this because the existing "4 by 4 Skyscrapers" for haskell has the clues set up this way. Makes it a bit easier for someone to build upon their old code, and it's easy enough to flatten if you don't want it.
My code's a mess, I was so happy to solve a 1kyu kata I haven't cleaned it up.
Not that pretty, I know.. but it's the first 'hard' haskell program I've written.
Note: This is tail recursive (it's a benefit; means it won't blow up the stack on long strings).
I refactored this to get rid of the special case in
divisors
. Also I got rid ofParallel.filter
since it wasn't helping.Link to Refactored Solution.