diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | eval.c | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,11 @@ +2014-01-30 Kaz Kylheku <kaz@kylheku.com> + + * eval.c (expand_op): Fix broken do operator. In the case of the do + operator, we must feed the entire form to the expander, not the + individual forms. That is to say (do operator arg) must expand the + form (operator arg), whereas (op fun arg) just expands the forms fun + and arg individually. + 2014-01-29 Kaz Kylheku <kaz@kylheku.com> Version 77 @@ -1648,7 +1648,7 @@ static val supplement_op_syms(val ssyms, val max) static val expand_op(val sym, val body) { - val body_ex = expand_forms(body); + val body_ex = if3(sym == op_s, expand_forms(body), expand(body)); val rest_gensym = gensym(lit("rest-")); cons_bind (syms, body_trans, transform_op(body_ex, nil, rest_gensym)); val ssyms = sort(syms, func_n2(lt), car_f); |