Abstract `body` over `fvars` and wrap it in a chain of `Lam` (or `Let` for `LDecl` entries) binders, innermost-first. The result has all of the listed fvars replaced by de Bruijn indices (`fvars[0]` becomes the outermost binder, `fvars[n-1]` the innermost). This is the inverse of the binder-opening pattern used during type checking: open with [`NameGenerator::fresh`], recurse, close back here so
(
&self,
intern: &mut InternTable<M>,
fvars: &[FVarId],
body: &KExpr<M>,
)
| 137 | /// |
| 138 | /// Mirrors `Lean.LocalContext.mkLambda`. |
| 139 | pub fn mk_lambda( |
| 140 | &self, |
| 141 | intern: &mut InternTable<M>, |
| 142 | fvars: &[FVarId], |
| 143 | body: &KExpr<M>, |
| 144 | ) -> KExpr<M> { |
| 145 | let abstracted = abstract_fvars(intern, body, fvars); |
| 146 | self.wrap_binders(intern, fvars, abstracted, /* as_lambda */ true) |
| 147 | } |
| 148 | |
| 149 | /// Abstract `body` over `fvars` and wrap it in a chain of `All` (or `Let` |
| 150 | /// for `LDecl` entries) binders, innermost-first. |
nothing calls this directly
no test coverage detected