code: function foldr(fn, ult, xs) {
    if (xs.length === 0) return ult;
    if (xs.length == 1) return fn(xs[0], ult);
    else return fn(xs.splice(0, 1)[0], foldr(fn, ult, xs));
  }
docs: `foldr` sourced from http://blog.thatscaptaintoyou.com/haskells-foldr-in-javascript/