code: function foldScoped(foldVar, foldLam, foldApp){
      return (function(term){
        return fold(
          function(idx){return function(d){return foldVar(d-1-idx)}},
          function(body){return function(d){return foldLam(d, body(d+1))}},
          function(fun, arg){return function(d){return foldApp(fun(d), arg(d))}})
          (term)(0);
      })
    }
docs: (Number -> t), (Number, t -> t), (t, t -> t), Term -> t Folds using named variables (numeric names).