I'm not sure if I quite understand you, "(A C)" In your Arc code suggests A is a function. Going by your first posted code, you can achieve this in Arc with:
good point, I should have thought that one through. Perhaps we should consider changing the return value of ">" so I'm correct? :P
It seems more useful to have the return value be the greater number if it is true, and since all non-nil values are true, it wont break any existing code. For a > b, consider the following:
Makes sense to me. It's a trivial change in ac.scm for < and >. What about (<= 1 2 3) and (>= 3 2 1)? The easiest way to do the same for those two is to return the last value compared, which would be 3 and 1 respectively. That doesn't exactly jibe with < and > though so I hesitate to make such a change. Thoughts?
It seems logical that <= and >= should also return some meaningful value if < and > do. If we come up with something good I'll push it to the anarki repo (git wiki). Although, we could always just ignore <= and >= for now.
I should have been clearer. I agree the semantics should be the same, I just didn't see an immediately clean way to add that to the current, recursive <= and >= functions. A thin wrapper would work just fine.
Got it.. thanks for introducing me to anaphoric macros :). Now the question is whether writing macros and having several aifs aands awhile aif2s for it is the way to go, or whether it is something that might be core-worthy, in a way that gosub (see post below) suggested.