How to treat a function like a list?
Posted: Sun Jul 04, 2010 6:52 am
I was trying to write what should be a simple function but found that I didn't know how to treat a function expression like a list. What I was trying to do was this; I wanted to write a function that I will call REV. What REV does is take a function expression as an argument and it executes the function except with its arguments in reverse order. So (rev (div 3 6)) executes
(div 6 3). This can be handy for rearranging an expression to a more aesthetic appearance. So how does one do something like this?
(div 6 3). This can be handy for rearranging an expression to a more aesthetic appearance. So how does one do something like this?