• Output:

    (+ 1 1)
    
    (+ 1 2 3)
    
    (+ (+ 1 2) (+ 3 4) (+ 5 6))
  • Example usage in a macro:

    (defmacro foo (&rest forms) (parse-infix-list forms))

    Example use of the macro:

    (foo 1 + 2)
    3
    CL-USER> (foo 1 + 2 + (3 - 4))
    2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment