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.
I would argue against doing so as it promotes boolean blindness. Also, nowhere in the domain of the problem does it contain an operation in which two directions are tested for equality.
The initial state of the haskell solution is wrong. The function signature should be [[Double]] -> Double and not [[Int]] -> Double
For Haskell, I am getting "Missing language" when submitting my answer.
Making this function safe should not be done via returning a string. Instead a sum type like Maybe or Either should be used. It seems the original Haskell solution used Either, but I guess it was removed.
I would have preferred catMaybes and partition to be moved into the list section because at the point you reach them you do not yet know how lists are going to work. Also the functions are over lists anyways, so it's that weird to put them with the other list functions. I do like the current order of Maybe to Either to List though.