Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Perhaps you were thinking of lexical scope vs dynamic scope? Lexical scoping would prevent a local definition of inner from changing the definition used in outer.

  (let ((inner (lambda (x) (+ x 3)))) (outer 5))
  "7"
But updating the definition of inner with set! or define changes the top-level definition.


Yes, I was thinking of lexical scope; as in redefining the function shadows the existing one and doesn't change the function already defined uses of call.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: