thanks for this interesting kata
i don't think it's (at least not trivially) possible to hard-code the answers here
but it certainly wouldn't harm to just randomize the order of the current tests.
Thanks for pointing that out, yep typo on my part, it should go 0,1,1,2,3....
I've changed the description to now make sense.
there is a discrepancy between your tests and the description:
in the description: (FIBONACCI)(ONE) -> returns 0
in sample tests: test.assert_equals((UNCHURCH_NUMBER)((FIBONACCI)(church_number(1))), 1)
I dont thing it makes sense to declare f_0, f_1 = 0, 0 right?
I Agree, Changed.
Was just looking into that, but I couldn't find the best way to do it in Python.
I think I know one way of implementing this, but if you have any ideas that would be great.
Sample Test Cases should be added.
This solution should be invalidated. But it is not easy to do in Python. You can get some ideas from the test code of this kata. Is it also possible to prohibit direct recursive calls?
It is better to rename CAR to FIRST and CDR to SECOND. LIST should be renamed to NIL (or something similar).
"In lambda calculus, lists are represented using pairs, with the first element of the pair representing the head of the list, and the second representing the tail of the list."
This is not true in this kata. Here lists are represented with pairs where the first element indicates whether the list is empty or not and the second element is another pair of the head and the tail of the list.
already done hours ago ;p
I am suspisious that @Shantuu__007 is cheating. It looks to me as if he has copied all the other solutions from sample size of katas that I've finished. Not once, did he have a solution that wasn't the same as someone else. I think other people should analyze his solutions. If found cheating, can someone report it? Please, someone look into this