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.
Cool! The Moinoid instance for functions was news to me. Comparing on multiple criteria like this is a common enough pattern that I consider using Ordering's Monoid instance a best practice. Nested case expressions creates a lot of noise.
Shlemiel the painter's algorithm :(
http://www.joelonsoftware.com/articles/fog0000000319.html
Yes! Someone else on this website apparently learned that total orderings form a monoid!
I agree. It seems to make more sense because the empty string "" does have (0 pairs of) balanced parens.