code: function flatten(a) {
    function _reduce(a) { return a.reduce(_flatten, []); }
  
    function _flatten(a, b) {
      return a.concat(Array.isArray(b) ? _reduce(b) : b);
    }
  
    return _reduce(a);
  }
docs: Flatten an array.