Example #1
0
 def __call__(self, *args):
   env = Environment(self.env)
   arg_spec = self.args
   if type(arg_spec) == Symbol:
     env[arg_spec.string] = scm_list(*args)
   else:
     env.update({b[0].string: b[1] for b in zip(arg_spec, args)})
   return [pysch.eval(f, env) for f in self.forms][-1]
Example #2
0
def eval(str):
    form = pysch.read(str)
    return pysch.eval(form, env)
Example #3
0
def eval(str):
  return pysch.eval(pysch.read(str), env)