Ad
  • Default User Avatar

    True, and thanks for your suggestions. I suspect that given this kata is rated at 42%, it will never see the light of day outside of beta, so it might be a lost cause now.

  • Custom User Avatar

    I completely agree. Sorry to the user that did that before it was prohibited :/

  • Custom User Avatar

    The tests should be working correctly.

  • Custom User Avatar

    Python translation was broken because it relied on file concatenation that we previously did internally.
    I've just fixed this by including the class declaration in the solution.
    Try resetting or start from the following:

    class Cons:
        def __init__(self, head, tail):
            self.head = head
            self.tail = tail
          
        def to_array(self):
            return [self.head] + (self.tail.to_array() if self.tail is not None else [])
          
        @classmethod
        def from_array(cls, arr):
            #TODO: convert a Python list to an algebraic list.
            pass
        
        def filter(self, fn):
            #TODO: construct new algebraic list containing only elements
            #      that satisfy the predicate.
            pass
        
        def map(self, fn):
            #TODO: construct a new algebraic list containing all elements
            #      resulting from applying the mapper function to a list.
            pass
    

    This invalidated many solutions, but it's better than having broken translation.

  • Custom User Avatar

    I think that the string is not trimmed in random tests:
    Expected: equal to muIcKiTXBKIdGdTwFMFnAxdtEUrRClWvsMPdJxay lPduzTkLMLxay
    Actual: muIcKiTXBKIdGdTwFMFnAxdtEUrRClWvsMPdJxay lPduzTkLMLxay

    After adding char in front and in end
    Expected: equal to PIPay
    Actual: PIPay

  • Default User Avatar

    Possibly. I was thinking 4kyu when I first devised this kata, but a couple of other people assessed it at 3kyu and 2kyu.

  • Custom User Avatar

    could the difficulty depends on the language? Because, just look at alexshavlovsky's comment below (doing java)

    if so, that's bad and the version you did should be updated with more demanding tests.

  • Custom User Avatar

    Fixing the tests is what I think is best (so all languages behave the same).

  • Custom User Avatar

    Punctuation marks shouldn't be inside words, they should be separated by spaces like in other languages.