Created
October 11, 2017 20:03
-
-
Save devmacrile/d4c282112ebefa064e3a28aafeb0bb80 to your computer and use it in GitHub Desktop.
Curious about how python handled simultaneous local definition compared to a Lisp example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#(let ((a 1)) | |
# (define (f x) | |
# (define b (+ a x)) | |
# (define a 5) | |
# (+ a b)) | |
# (f 10)) | |
a = 1 | |
def f(x): | |
b = a + x | |
a = 5 | |
return a + b | |
print(f(10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment