Ad
  • Custom User Avatar

    (* 2 (/ 1 (^ (cos (* 2 x)) 2))) can be simplified to (/ 2 (^ (cos (* 2 x)) 2)) but this is not accepted as an answer.

  • Custom User Avatar

    how? I'm having the same problem. it should work, but items doesn't modify in the global scope.

  • Custom User Avatar

    First, Chain.run checks to see if there are any links in the chain (line 11).
    Line 12 shifts the callback array one to the left, then executes the callback that is returned.

    the first parameter is "next". It references Chain.prototype.run.bind(this, end). We could also use this.run.bind(this, end), but I wanted to be more explicit.

    The second parameter is end.

    When you don't have any more links, execute end()!

  • Custom User Avatar

    the chain.prototype.run function can be reduced to one recursive call [else: end()]. Look at my fork :-)