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.
Thanks for putting this together. Working this kata did a lot to force me to understand how lenses work.
If you want, you can do this in one line
Agreed. Test case is f = x * x with n = 4 over [2,6]. I don't see how this can be -6.0.
Thanks for your post!
Thanks for this. I like Kata for which brute force times out and makes me think about the math. Plus, it's one of the few that I could solve with a (convoluted) one liner.
Extremely enjoyable kata. Thanks for taking the time to put this together with a clear problem statement and nice tests.
I actually kind of disagree with this "feature" request. Own your ugly, messy code. It's a normal part of the process. All projects build technical debt, and that debt comes from messy unrefactored code. Don't let your ego prevent you from getting working code out the door. I think having your old solutions also lets you look at your own evolutionary process. One of the points of katas is that they are something that you repeat many times until you can do them perfectly.
The test cases below your code block are not provided, and have only a dummy test that compares the string literals of "actual" and "expected". You can either copy in your own unit tests, or ignore them and submit.
Thanks!
Really nice. Fun, non-trivial problem.