 #
 #
 lextends = (fn, ids, values) ->
-  if (pairp pts)
-    extend (@lextends fn, (cdr pts), (cdr ims)), (car pts), (car ims)
+  if (pairp ids)
+    extend (lextends fn, (cdr ids), (cdr values)), (car ids), (car values)
   else
     fn
-
-
 
 translate = (exp, store, qont) ->
   if (pairp exp)

  c = parseInt(e.v, 10)
  if (typeof c == 'number') then c else throw new LispInterpreterError("Not a number: " + Object.toString(c))

store_init = (a) -> throw new LispInterpreterError "No such address"
env_init = (a) -> throw new LispInterpreterError "No such variable"  


    callable = (values, kont, store) =>
      if not eq arity, (length values)
        throw new LispInterpreterError "Incorrect Arity for #{name}"
      kont (value.apply(null, listToVector(values))), store
    @definitial name, (inValue callable)

  defarithmetic: (name, value, arity) ->
