code: func (s *callStack) lookUpVar(id ast.Identifier) *cachedThunk {
  	for i := len(s.stack) - 1; i >= 0; i-- {
  		bind, present := s.stack[i].env.upValues[id]
  		if present {
  			return bind
  		}
  		if s.stack[i].isCall {
  			// Nothing beyond the captured environment of the thunk / closure.
  			break
  		}
  	}
  	return nil
  }
docs: // lookUpVar finds for the closest variable in scope that matches the given name.