 'use strict'
 
-{ NUMBER, STRING, NULL } = jinter
+{ NUMBER, STRING, NULL, UNDEFINED } = jinter
 
 
 ev = (exp, env) ->

		formalArgument.name

	new FUNCTION exp.body, env, formalArguments


Nodes['Program'] = (exp, env) ->

Nodes['CallExpression'] = (exp, env) ->
	closure = ev exp.callee

	# this
	newEnv = closure.env.con 'this', NULL

	# arguments
	newEnv = exp.arguments.reduce (argument, resultingEnv, index) ->
		name = closure.formalArguments[index]
		value = ev argument, env

		resultingEnv.con name, value
	, newEnv

	# vars
	newEnv = closure.body.vars.reduce (name, resultingEnv) ->
		resultingEnv.con name, UNDEFINED
	, newEnv

	ev closure.body, newEnv


Nodes['FunctionDeclaration'] = (exp, env) ->
