Ad
  • Custom User Avatar

    I cannot pass "random tests: treeToParens inverts parensToTrees"

    In expected parens I can find cases where there are 3 or more siblings for example ()()().

    How can I transform this in Branch structure if I have only left and right branhces available?

  • Custom User Avatar

    I suspect tests are not as discriminating as you intended. I used (Eq k) => and got away with it.

  • Custom User Avatar

    I love this kata! I created a C translation. Please have a look and let me know what you think. :-)

    I had to use different data structures, but I tried to stay close to the basic idea as exemplified by Haskell.

    I also changed the description because some of it was only relevant for Haskell, but I used languag-conditional rendering to make sure that the specific parts are still shown when the user is looking at the Haskell version.

  • Custom User Avatar

    I am sorry if it's my Haskell ineptitude getting in the way again, but is order strictly defined for Data.Tree?