Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created April 12, 2014 16:44
Show Gist options
  • Save 1ambda/10545145 to your computer and use it in GitHub Desktop.
Save 1ambda/10545145 to your computer and use it in GitHub Desktop.
;; in dynamic scoping
(defun my-compose (f g)
(lambda (x)
(funcall f (funcall g x))))
(funcall
(my-compose (lambda (n) (+ n 3)) (lambda (n) (+ n 20)))
100) ; results in error, Lisp error: (void-variable f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment