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, fun kata!
that's a neat solution
Your foldl is crazy :P
Cool, I just published a quick fork :)
There is a merge conflict in the description. Can you fork this and save the fork? That should update the description to the latest. (You may need to make a trivial change to the code, like add some whitespace, in order to save)
Hmm, good point. I didn't expect people to hack into it this hard though lol!
I'll write something up when I've invalidated these kinds of solutions, dynamically generating predicates seems like a good idea.
This comment is hidden because it contains spoiler information about the solution
Alright, I've changed the description to clarify what kind of predicates should work with
iss/2
, and added cases for testing expressions with other non-arithmetic predicates! Hopefully this makes the kata a bit clearer.That's a fair point, I'll try adding new custom tests.
The only thing is I'm afraid of solutions passing right getting invalidated by some reasonable new sample usages though (I know
X iss length([1,2,3,4,5])
invalidates all solutions right now).I'm not sure what to do about that - if I should limit tests to cases that work for current solutions or not. Maybe it is better with these to make it more robust?
EDIT : Maybe I can keep the initial constraint that user defined arithmetic predicates take only numbers as inputs (like
is/2
) and it'd be fine for this kataIf the core part of the task is to implement
iss/2
, it should be tested separately. All the sample tests do is to testiss/2
along withfib/1
andfib/3
, which couples everything together in the tests and makes it impossible to test the behaviour ofiss/2
. (There are already 2 lines of example usage ofiss/2
in the description, they really should be put in the sample tests.)Nice catch! I'll fix that right now, and re-read my desc just in case.
A minor description issue:
iss/3
should beiss/2
in the first paragraph of Task Part 1 - meta-ish programming.Loading more items...