pub fn make_locals_generator( locals: &mut Vector<VarId, Var>, ) -> impl FnMut(Ty) -> VarId + '_
Makes a lambda that generates a new variable id, pushes a new variable in the body locals with the given type and returns its id.