Q:

Checking Clojure function equality by name

As an exercise in manipulating code as data I wanted to take a piece of Clojure code and change all the bar calls for foo calls. But I came across a struggle in checking for function equality. My problem is:
(= foo foo) ;returns true
(= foo (first `(foo))) ;returns false 

What is the proper way of checking for the second equality?

A:

The reason is that you quote the list:
> (= 'foo (first '(foo)))
true
> (= 'foo (first (list foo)))
false
> (= foo (first (list foo)))
true

