glycerine/zygomys

mux function call mismatch

qjpcpu opened this issue · 3 comments

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.

thanks. if you figure out a fix, I'll be happy to incorporate it.

#56

Merged. Thank you.