Is there a way to make a list that holds functions? What I’m trying to do is, make a list of some arithmetic operators (+ - * /) so I can easily manipulate their order and apply them to a list of numbers.
So, if I have that list, I’d use it like this:
(apply (map (lambda (x)
x)
'(+ - * /))
'(1 2 3 4))
I’m a novice programmer, so if there’s a better way to do such operation, your advice is much appreciated.
Lists are made with the function LIST.
Applying a list of symbols makes no sense:
Would be (applying a list of functions still makes no sense):
Simplified (still wrong):
But, maybe you wanted this:
In Common Lisp:
Returns: