     return result;
   }
       
+  if (listp(function) && issymbol(car(function), LAMBDA)) {
+    form = closure(TCstart, fname, NULL, cdr(function), args, &env);
+    pop(GCStack);
+    TC = 1;
+    goto EVAL;
+  }
+
   if (listp(function) && issymbol(car(function), CLOSURE)) {
-    form = closure(TCstart, fname, cdr(function), args, &env);
+    function = cdr(function);
+    form = closure(TCstart, fname, car(function), cdr(function), args, &env);
     pop(GCStack);
     TC = 1;
     goto EVAL;
   }    
-
+  
   error2(fname, F("is an illegal function")); return nil;
 }
 
 // Input/Output
 
 void printobject(object *form){
+  #if defined(debug2)
+  Serial.print('[');Serial.print((int)form);Serial.print(']');
+  #endif
   if (form == NULL) Serial.print(F("nil"));
-  else if (listp(form) && issymbol(car(form), CLOSURE) && car(cdr(form)) != NULL) {
-    Serial.print(F("<closure>"));
-  } else if (listp(form)) {
+  else if (listp(form) && issymbol(car(form), CLOSURE)) Serial.print(F("<closure>"));
+  else if (listp(form)) {
     Serial.print('(');
-    if (issymbol(car(form), CLOSURE)) {
-      Serial.print(F("lambda"));
-      form = cdr(form);
-    } else printobject(car(form));
+    printobject(car(form));
     form = cdr(form);
     while (form != NULL && listp(form)) {
       Serial.print(' ');

// Built-in procedure names - stored in PROGMEM

const char string0[] PROGMEM = "symbols";
const char string1[] PROGMEM = "(";
const char string2[] PROGMEM = ")";
const char string3[] PROGMEM = "'";
const char string4[] PROGMEM = ".";
const char string5[] PROGMEM = "nil";
const char string6[] PROGMEM = "t";
const char string7[] PROGMEM = "lambda";
const char string8[] PROGMEM = "let";
const char string9[] PROGMEM = "let*";
const char string10[] PROGMEM = "closure";
const char string11[] PROGMEM = "special_forms";
const char string12[] PROGMEM = "quote";
const char string13[] PROGMEM = "defun";
const char string14[] PROGMEM = "defvar";
const char string15[] PROGMEM = "setq";
const char string16[] PROGMEM = "loop";
const char string17[] PROGMEM = "push";
const char string18[] PROGMEM = "pop";
const char string19[] PROGMEM = "incf";
const char string20[] PROGMEM = "decf";
const char string21[] PROGMEM = "dolist";
const char string22[] PROGMEM = "dotimes";
const char string23[] PROGMEM = "for-millis";
const char string24[] PROGMEM = "tail_forms";
const char string25[] PROGMEM = "progn";
const char string26[] PROGMEM = "return";
const char string27[] PROGMEM = "if";
const char string28[] PROGMEM = "cond";
const char string29[] PROGMEM = "when";
const char string30[] PROGMEM = "unless";
const char string31[] PROGMEM = "and";
const char string32[] PROGMEM = "or";
const char string33[] PROGMEM = "functions";
const char string34[] PROGMEM = "not";
const char string35[] PROGMEM = "null";
const char string36[] PROGMEM = "cons";
const char string37[] PROGMEM = "atom";
const char string38[] PROGMEM = "listp";
const char string39[] PROGMEM = "consp";
const char string40[] PROGMEM = "numberp";
const char string41[] PROGMEM = "eq";
const char string42[] PROGMEM = "car";
const char string43[] PROGMEM = "first";
const char string44[] PROGMEM = "cdr";
const char string45[] PROGMEM = "rest";
const char string46[] PROGMEM = "caar";
const char string47[] PROGMEM = "cadr";
const char string48[] PROGMEM = "second";
const char string49[] PROGMEM = "cdar";
const char string50[] PROGMEM = "cddr";
const char string51[] PROGMEM = "caaar";
const char string52[] PROGMEM = "caadr";
const char string53[] PROGMEM = "cadar";
const char string54[] PROGMEM = "caddr";
const char string55[] PROGMEM = "third";
const char string56[] PROGMEM = "cdaar";
const char string57[] PROGMEM = "cdadr";
const char string58[] PROGMEM = "cddar";
const char string59[] PROGMEM = "cdddr";
const char string60[] PROGMEM = "length";
const char string61[] PROGMEM = "list";
const char string62[] PROGMEM = "reverse";
const char string63[] PROGMEM = "nth";
const char string64[] PROGMEM = "assoc";
const char string65[] PROGMEM = "member";
const char string66[] PROGMEM = "apply";
const char string67[] PROGMEM = "funcall";
const char string68[] PROGMEM = "append";
const char string69[] PROGMEM = "mapc";
const char string70[] PROGMEM = "mapcar";
const char string71[] PROGMEM = "+";
const char string72[] PROGMEM = "-";
const char string73[] PROGMEM = "*";
const char string74[] PROGMEM = "/";
const char string75[] PROGMEM = "mod";
const char string76[] PROGMEM = "1+";
const char string77[] PROGMEM = "1-";
const char string78[] PROGMEM = "abs";
const char string79[] PROGMEM = "random";
const char string80[] PROGMEM = "max";
const char string81[] PROGMEM = "min";
const char string82[] PROGMEM = "=";
const char string83[] PROGMEM = "<";
const char string84[] PROGMEM = "<=";
const char string85[] PROGMEM = ">";
const char string86[] PROGMEM = ">=";
const char string87[] PROGMEM = "/=";
const char string88[] PROGMEM = "plusp";
const char string89[] PROGMEM = "minusp";
const char string90[] PROGMEM = "zerop";
const char string91[] PROGMEM = "oddp";
const char string92[] PROGMEM = "evenp";
const char string93[] PROGMEM = "read";
const char string94[] PROGMEM = "eval";
const char string95[] PROGMEM = "locals";
const char string96[] PROGMEM = "globals";
const char string97[] PROGMEM = "makunbound";
const char string98[] PROGMEM = "break";
const char string99[] PROGMEM = "print";
const char string100[] PROGMEM = "princ";
const char string101[] PROGMEM = "gc";
const char string102[] PROGMEM = "pinmode";
const char string103[] PROGMEM = "digitalread";
const char string104[] PROGMEM = "digitalwrite";
const char string105[] PROGMEM = "analogread";
const char string106[] PROGMEM = "analogwrite";
const char string107[] PROGMEM = "delay";
const char string108[] PROGMEM = "millis";
const char string109[] PROGMEM = "shiftout";
const char string110[] PROGMEM = "shiftin";
const char string111[] PROGMEM = "note";

const tbl_entry_t lookup_table[] PROGMEM = {
  { string0, NULL, NIL, NIL },
  { string1, NULL, 0, 0 },
  { string2, NULL, 0, 0 },
  { string3, NULL, 0, 0 },
  { string4, NULL, 0, 0 },
  { string5, NULL, 0, 0 },
  { string6, NULL, 0, 0 },
  { string7, NULL, 0, 127 },
  { string8, NULL, 0, 127 },
  { string9, NULL, 0, 127 },
  { string10, NULL, 0, 127 },
  { string11, NULL, NIL, NIL },
  { string12, sp_quote, 1, 1 },
  { string13, sp_defun, 0, 127 },
  { string14, sp_defvar, 0, 127 },
  { string15, sp_setq, 2, 2 },
  { string16, sp_loop, 0, 127 },
  { string17, sp_push, 2, 2 },
  { string18, sp_pop, 1, 1 },
  { string19, sp_incf, 1, 2 },
  { string20, sp_decf, 1, 2 },
  { string21, sp_dolist, 1, 127 },
  { string22, sp_dotimes, 1, 127 },
  { string23, sp_formillis, 1, 127 },
  { string24, NULL, NIL, NIL },
  { string25, tf_progn, 0, 127 },
  { string26, tf_return, 0, 127 },
  { string27, tf_if, 2, 3 },
  { string28, tf_cond, 0, 127 },
  { string29, tf_when, 1, 127 },
  { string30, tf_unless, 1, 127 },
  { string31, tf_and, 0, 127 },
  { string32, tf_or, 0, 127 },
  { string33, NULL, NIL, NIL },
  { string34, fn_not, 1, 1 },
  { string35, fn_not, 1, 1 },
  { string36, fn_cons, 2, 2 },
  { string37, fn_atom, 1, 1 },
  { string38, fn_listp, 1, 1 },
  { string39, fn_consp, 1, 1 },
  { string40, fn_numberp, 1, 1 },
  { string41, fn_eq, 2, 2 },
  { string42, fn_car, 1, 1 },
  { string43, fn_car, 1, 1 },
  { string44, fn_cdr, 1, 1 },
  { string45, fn_cdr, 1, 1 },
  { string46, fn_caar, 1, 1 },
  { string47, fn_cadr, 1, 1 },
  { string48, fn_cadr, 1, 1 },
  { string49, fn_cdar, 1, 1 },
  { string50, fn_cddr, 1, 1 },
  { string51, fn_caaar, 1, 1 },
  { string52, fn_caadr, 1, 1 },
  { string53, fn_cadar, 1, 1 },
  { string54, fn_caddr, 1, 1 },
  { string55, fn_caddr, 1, 1 },
  { string56, fn_cdaar, 1, 1 },
  { string57, fn_cdadr, 1, 1 },
  { string58, fn_cddar, 1, 1 },
  { string59, fn_cdddr, 1, 1 },
  { string60, fn_length, 1, 1 },
  { string61, fn_list, 0, 127 },
  { string62, fn_reverse, 1, 1 },
  { string63, fn_nth, 2, 2 },
  { string64, fn_assoc, 2, 2 },
  { string65, fn_member, 2, 2 },
  { string66, fn_apply, 2, 127 },
  { string67, fn_funcall, 1, 127 },
  { string68, fn_append, 0, 127 },
  { string69, fn_mapc, 2, 3 },
  { string70, fn_mapcar, 2, 3 },
  { string71, fn_add, 0, 127 },
  { string72, fn_subtract, 1, 127 },
  { string73, fn_multiply, 0, 127 },
  { string74, fn_divide, 2, 127 },
  { string75, fn_mod, 2, 2 },
  { string76, fn_oneplus, 1, 1 },
  { string77, fn_oneminus, 1, 1 },
  { string78, fn_abs, 1, 1 },
  { string79, fn_random, 1, 1 },
  { string80, fn_max, 1, 127 },
  { string81, fn_min, 1, 127 },
  { string82, fn_numeq, 1, 127 },
  { string83, fn_less, 1, 127 },
  { string84, fn_lesseq, 1, 127 },
  { string85, fn_greater, 1, 127 },
  { string86, fn_greatereq, 1, 127 },
  { string87, fn_noteq, 1, 127 },
  { string88, fn_plusp, 1, 1 },
  { string89, fn_minusp, 1, 1 },
  { string90, fn_zerop, 1, 1 },
  { string91, fn_oddp, 1, 1 },
  { string92, fn_evenp, 1, 1 },
  { string93, fn_read, 0, 0 },
  { string94, fn_eval, 1, 1 },
  { string95, fn_locals, 0, 0 },
  { string96, fn_globals, 0, 0 },
  { string97, fn_makunbound, 1, 1 },
  { string98, fn_break, 0, 0 },
  { string99, fn_print, 1, 1 },
  { string100, fn_princ, 1, 1 },
  { string101, fn_gc, 0, 0 },
  { string102, fn_pinmode, 2, 2 },
  { string103, fn_digitalread, 1, 1 },
  { string104, fn_digitalwrite, 2, 2 },
  { string105, fn_analogread, 1, 1 },
  { string106, fn_analogwrite, 2, 2 },
  { string107, fn_delay, 1, 1 },
  { string108, fn_millis, 0, 0 },
  { string109, fn_shiftout, 4, 4 },
  { string110, fn_shiftin, 3, 3 },
  { string111, fn_note, 0, 3 },
};

// Table lookup functions

  (void) env;
  object *var = first(args);
  if (var->type != SYMBOL) error2(var, F("is not a symbol"));
  object *val = cons(symbol(LAMBDA), cdr(args));
  object *pair = value(var->name,GlobalEnv);
  if (pair != NULL) { cdr(pair) = val; return var; }
  push(cons(var, val), GlobalEnv);
