Fourier series visualisation with D3.js
  function FT(A, N, φ) {
    φ = φ || 0;
    return function(x) {
      var n = -1, y = 0;
      while (++n < N) {
        y += A[n] * Math.sin(τ * (n + 1) * x + φ);
      }
      return y;
    }
  }

hehe, seems annoying to type. Copy&paste everytime one of them is needed?