evaluate the car of a list as a function in lisp -


i doing homework , need help. don't want me give me guidance. need write function takes list of 2 numbers , operator written in traditional notation (3 + 2) , yield same function in prefix notation (+ 3 2) , evaluate (5). can convert 1 notation other when need evaluate going force car of list (+) function rather element of list , pass car of list (3 2) parameters function. thing don't know how force + + instead of '+'. again don't want write function me set me on right track.

use fdefinition convert symbol function object (optionally) , use apply (if not know number of arguments) or funcall (if do) invoke function.


Popular posts from this blog