I'm using CLISP and am trying
(if ( = (first '(+ 2 3)) + ) 10 20) //10 and 20 are just placeholders
I am trying to create a program that converts between infix, postfix, and prefix. I believe that my first step should be finding the symbols +, -, *, and / in the string. There will be no parentheses in the input. So, i am trying to search for each symbol systematically. the advantage of my approach is the ability to prioritize * over + etc.
I have a general idea of my approach, but any thoughts would be nice. my first idea is:
(append (rest '(+ 2 3)) (list (first '(+ 2 3))))
and yes, i plan on using recursion.