Skip to content

Instantly share code, notes, and snippets.

@SamuraiT
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamuraiT/259ac5b2e170f6e42d8f to your computer and use it in GitHub Desktop.
Save SamuraiT/259ac5b2e170f6e42d8f to your computer and use it in GitHub Desktop.
Environment for simple lisp
Env = dict
def starndard_env():
import operator as op
env = Env()
env.update({
'+': op.add,
'-': op.sub,
'*': op.mul,
'/': op.truediv,
'>': op.gt,
'<':op.lt,
'>=': op.ge,
'<=': op.le,
'=': op.eq,
})
return env
global_env = starndard_env()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment