mux function call mismatch
qjpcpu opened this issue · 3 comments
qjpcpu commented
mux function: register a function for multiple name, forexample, the builtin function "+ - * /".
when pass a mux function to another function, the behavior would be unpredictable:
(defn sub [f a b] (f a b))
(sub - 2 1) ;; expect 1 but get 3
when execute function '-' , its name changes to 'f', so use '+' as its default operand.
well, this bug comes from glisp, too.
glycerine commented
thanks. if you figure out a fix, I'll be happy to incorporate it.
glycerine commented
Merged. Thank you.