Ad
  • Custom User Avatar

    Sorry, but the test cases could have been a little more helpful. I wasted a lot of time because I thought, that my bind-function was wrong (because the tests in category "Bound functions evaluated on Something" failed). But it failed because my lift-function was wrong.

    How about adding at least one test which just tests the bind-function? Tests which combine a lot of functionality are helpful for thorough testing of correctness, but they are not really appropriate for isolating and finding the defect.
    The error message wasn't helpful, either (see below).

    Additionally, the description and the code comments didn't match. The comment for the do-function didn't mention a word about the signature of fns and the necessity of calling bind on the functions. If you wanted the user to find this out by himself, it shouldn't be in the description at all. But using two different descriptions is quite confusing.

    Otherwise, nice introduction to monads.

    The error "message":

    bind(unit(1),function (parameter) {
    // the function returned by bind
    }) is function (parameter) {
    // the function returned by bind
    }(1) is unit(Just 2) - Expected: Just 2, instead got: [object Object]

  • Custom User Avatar

    It is specified that the console output trims whitespace? My suggested change was not referring to the kata, but to the general logging mechanism in codewars. But this was probably the wrong place to make this comment.

  • Custom User Avatar

    Apparently, the console output trims \n and spaces automatically. Maybe this should be changed to avoid confusion.

  • Custom User Avatar

    Test Failed: Returned 'apples, pears grapes bananas' but expected 'apples, pears grapes bananas'
    Am I missing something here?

  • Custom User Avatar

    Wouldn't this return true when giving the following (wrong) board?
    [[5, 5, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 5, 5, 5]]