News for hackers. Stuff that matters.
Re:A lambda is not necessarily a closure by waldrews on Tuesday February 09, 2016 @01:17AM (#11063489)
Doesn't (lambda (x) (+ x 1)) capture +? You could evaluate (lambda (x) (+ x 1)) in a scope of, say, (let ((+ *)) (lambda (x) (+ x 1))) - in some lisps.
Re:A lambda is not necessarily a closure by bandrami on Tuesday February 09, 2016 @02:09AM (#11063657)
Ah, I guess in Scheme it does (I use Common Lisp, where the two namespaces are different). But even then you would need the actual environment there for it to be a closure. The lambda expression is only half of a closure. It's "let over lambda" that is a closure.