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 agree this is very clever and concise, but is it really best practices?
Thanks. What do you suggest in place of the switch? Using a Hash?
This comment is hidden because it contains spoiler information about the solution
Clever! I like it, but is it really best practice? If you are given a large array and the some of the first elements are out of order, you be iterating through the whole array before the function returns false. Wouldn't it be optimal to return early when an out-of-order sequence is detected?
I found it unclear that this only had to be built to handle exactly 3 chained methods, not an arbitrary amount. So for anyone wondering, you only need it to work for Calc.new.number.operator.number. Nothing else.
See the comments below. I think that we need to use integers for the Ruby version. The description is a bit confusing. Still in the process of figuring that out.
I had to submit the final solution multiple times for it to work. This has happened to me on multiple Haskell Katas. I'm not sure if it is this specific Kata or something with the Codewars backend. Anyone have any ideas?