Given a simple list say '(+ 1 2) I am trying to simply evaluate the expression. But it doesn't seem to think the car of the list is a procedure.
(define i '(+ 1 2))
> i (+ 1 2)
(procedure? (car i))
> #f
(procedure? +)
> #t
(car i)
> +
(apply (car i) (cdr i))
; apply: contract violation
; expected: procedure?
; given: +
; argument position: 1st
; [,bt for context]
I was wondering if there is a way to take the car and use it as a procedure or if there is a better way to do it.