1. 8
  1. 3

    Very clear explanation with nice accompanying code! Having only small diffs between each chunk of code makes it simple to follow along. There are no mystical leaps.

    When I saw [first].concat([second]), I thought “why would you do that for simple two-element array; why not just [first, second]? Then I saw the followup with varargs, [first].concat(args). I’ve found this sort of minimal-change approach to be very useful for teaching novices.

    1. 1

      I love this. Partial application Is one of those things that are really powerful and useful when you get used to thinking in those terms. Especially when combined with high order functions, as shown.