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

> JS is not Lisp where a function means just one thing used

Lisp uses dynamic binding for that.

  (defun do-something ()
    (funcall *something-to-call*))

  (let ((*something-to-call* 'turn-the-light-on))
    (do-something))
The behavior depends on the dynamic binding, which provides the context...


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

Search: