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.
You could use
.unwrap_or(0)
rather than pattern matching.Writing
between
as infix would make it even more readable.Convention that denotes an unused variable that is passed to the block. It actually has a special syntactic meaning in that it's the only variable name that can appear multiple times, e.g.
[].map.with_index { |x, x| }
is invalid while[].map.with_index { |_, _| }
is valid.