Ad
  • Custom User Avatar
    • since the text is in English . should be used instead of ,
    • the method name in the given java code should start with lower case
  • Custom User Avatar

    From the description:

    Your task to create a Deferred class which should have the following parameters

    • new constructor() is calling a constructor creating an object but not a class. As long as the new ES6 class is not used, we should not say: "create a class"

    • what is referred as "parameters" is (IMHO) more a field, member or function

    • a return this statement is used at the end of the dummy implementation. This is implicite if uses in conjunction with new and should (IMHO) not be added.

  • Custom User Avatar

    Espacially the redo operations reads as it can only applied directly after an undo operation, specifically not after a redo itself.

  • Custom User Avatar

    Oh sorry, my fault. I missed that very line :/

  • Custom User Avatar

    Hi, cool kata. As some already mentioned, the function.toString method is not widely known. I know that something is possible due to the use of AngularJS. I think you should mention this as a hint.

    Additionally, the last test is a little bit mean. It is a kata for its own.

    Aaand just one note to the description: I think it's a hash or object and not a JSON. JSON would look like {"c": 3}

  • Custom User Avatar

    This is a quite short answer. As you can see I tried to achieve something similar to pattern matching. Additionally, I make use of the fact, that the result of an assignment is the assigned value.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Thanks!

    @OverZealous: a also used the even function in the example test fixture.

  • Custom User Avatar

    Mh, that was just a hint to be more creative than using only the id() function. I added an additional testcase.

  • Custom User Avatar

    @OverZealous: It is not unusual to have Stream implementations without any stepping functions and always using n + 1. A Stream is a kind of an Array and stepping is equivalent to the always increasing index. That's BTW the reason I added a default implementation for it.

  • Custom User Avatar

    Absolutely, I wrote some convenience methods and defaults for easier testcases but forgot, that a possible solution will not contain these. -> I removed this requirements.

  • Custom User Avatar

    First, I will remove the useless this constraint. The reason why I not added the function as the part of the fixture is, that the space for it is already cluttered with the comments about the test fixture.

  • Custom User Avatar

    Thanks for the feedback. I added the result as a comment... And I will move it up to 5kyu due to the this-thingy

  • Custom User Avatar

    Ok, take your time... :D

    Be patient, this is my first kata...

  • Custom User Avatar

    This shows - again - that some key features are missing to make JS a real functional language.

  • Loading more items...