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.
How do I know if I did it the inteded way?
Bleh. I didn't know lenses before I started, and I still dont know how most of the lensy things I just wrote work. This was frustrating; basically just blindly following types, with no intuition. What is a Protofunctor? What is a "witness"? Some crazy category theory stuff I guess?
Towards the end of it, I was just motivated by sunk cost (and wanting to complain about how annoying it was).
The last Iso problem is untested (so I could have left it blank), and I have no idea what "coerce" was about but it seemed to be happy with it as bottom, so I didn't touch it.
Side note: Either is not traversable in this version of haskell, so I implemented it myself.
The instructions are not clear for someone who has not played bowling before. Specifically, I could not figure out how 2 or 3 balls are chosen in the 10th frame, and had to go spend a half hour looking up rules.
I suggest adding something like this:
This was rather frustrating to deal with, and has nothing to do with programming.
This comment is hidden because it contains spoiler information about the solution
So I notice that all the top solutions don't check for empty string. Are "empty strings" not considered a valid string, or is that just not a test we care about?
You don't need to go low level or recursive for it though, just save the lengths in a tuple instead of recomputing them.
Admittedly, my solution pulled in Arrows, which is also kinda silly.
Wouldn't this have a pretty terrible time complexity? The lengths are not going to be cached, right?