Ad
  • Custom User Avatar

    Approved the fork.

  • Custom User Avatar

    At some point, the description must have been updated as it now specifies that the input consists solely of ASCII letters, which consists only of ['A'..'Z'] ++ ['a'..'z'].

    Haskell fork which updates the tests to conform to this specification.

  • Custom User Avatar

    OP solved it, closing. (Your initial code will not work for odd number of chained calls)

  • Custom User Avatar

    Yes, and "\201", "\213", etc. are considered uppercase. They really shouldn't be.

  • Custom User Avatar

    I agree, such twisted logic don't belong to anything bigger than such self encapsulated function. If a code is meant to be mantained, it should be simple.

  • Custom User Avatar

    Not necessarily. Although I made it like that just for fun, I could totally use functions like that in bigger projects. They are like components or DLLs, just put them in a project and they do what they were made to. They are small, so once you wrote a function like that, you can forget about how it works and just use as compiled code. For example, I often use a function for stable sorting, so for me it is quite important for size of that function to be as small as possible.

    Look at 140byt.es. There are many little, practical functions ready to use (some of them have some limitations, which are described). Also each of them is annotated, so if you want you can learn how they are made.

    Such snippets are also compliant with the Small.JS manifesto.

  • Custom User Avatar

    Any special cases? Otherwise I don't see a reason to do so, 'cause it's only a 7 kyu kata.