environment(const cells & parms, const cells & args, environment * outer) : outer_(outer) { cellit a = args.begin(); for (cellit p = parms.begin(); p != parms.end(); ++p) env_[p->val] = *a++; }
cell proc_less_equal(const cells & c) { long n(atol(c[0].val.c_str())); for (cellit i = c.begin()+1; i != c.end(); ++i) if (n > atol(i->val.c_str())) return false_sym; return true_sym; }
cell proc_sub(const cells & c) { long n(atol(c[0].val.c_str())); for (cellit i = c.begin()+1; i != c.end(); ++i) n -= atol(i->val.c_str()); return cell(Number, str(n)); }
cell proc_mul(const cells & c) { long n(1); for (cellit i = c.begin(); i != c.end(); ++i) n *= atol(i->val.c_str()); return cell(Number, str(n)); }