(sin (abs (ceil x)))
Fanda wrote a wonderful function he called PASS that enabled us to write this as
(pass (sin abs ceil) x)
That's pretty good but could we do better? I came to thinking about this when I was writing a redefinition of the NOT function as
Code: Select all
(define-macro (n)
(if (true? (args 0)) nil
(nil? (args 0)) true
(not (eval (if (= 1 (length (args)))) (args 0) (args))))
))
(sin (abs (ceil x)))
as the more natural
(sin abs ceil x)
without the need for any PASS type of function at all. I think this solution is better than PASS because in this case when using PASS you eliminate 2 parentheses but must type PASS for a net gain of two characters. You would need a nesting at least 4 levels deep to finally get a net gain in typing. Doing it my way results in a gain for typing at any level of nesting since the behavior is part of the functions to begin with. If DEFINE cannot be changed then perhaps we could have a DEFINE-SINGLE command to deal with single argument functions.