Closed qjpcpu closed 2 years ago
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.
thanks. if you figure out a fix, I'll be happy to incorporate it.
https://github.com/glycerine/zygomys/pull/56
Merged. Thank you.
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:
when execute function '-' , its name changes to 'f', so use '+' as its default operand.
well, this bug comes from glisp, too.