KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What's the point of using the set! assignment operator in scheme? Why not just rebind a variable to a new value using define ? > (define x 100) > (define (value-of-x) x) ;; value-of-x closes over "x" > x 100 > (value-of-x) 100 > (set! x (+ x 1)) > x 101 > (value-of-x) 101 > (define x (+ x 1)) > x 102 > (value-of-x) 102 >
Tags (comma-separated)
Save Edits
Cancel