code: function listFold(list, z, f, n) {
    if (n < list.length) {
      return f(list[n], function () {
        return listFold(list, z, f, n + 1);
      });
    } else {
      return z;
    }
  }
docs: - *fold : (seq : Seq a | Array a, z : b, f : (a, () → b) → b) : b* &mdash; polymorphic version of fold. Works with arrays too.