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.
Well, in your first example, you aren't calling the functions, so the result is incorrect. (I'm not sure why you are assigning variables in the second example.)
In your test case above, it will always fail if your code is correct. This is because you are passing false into the
_if
function, which will mean the second function is evaluated. However, your second function is returningfalse
, which means the final value returned toTest.expect
isfalse
.This is why your test case failed, while the submission passed.
So, why did the first attempt succeed? It's because you were returning the functions themselves, rather than their result, which looks like this:
Now that you've solved the kata, you can go back and see the other solutions from other users. Hopefully this helps you! If that all makes sense, feel free to mark this issue as resolved.
What language are you testing, and do you mind posting your code?
@matt6frey, Were you ever able to get the solution to submit?
It might be a one-off quirk. If you can, copy your solution as it is, reload the page, paste your solution back in and try again.
Sometimes this fixes the issue for me. (Copying your solution ensures that you won't lose your work if something goes wrong.)