hunterge
hunterge

Reputation: 653

Is there an opposite of 'eq' in Lisp?

I am comparing the first value of two lists, with two outcomes, they are either equal or unequal. My first IF statement is:

(if (eq (car L1) (car L2)))

Is there an opposite of 'eq' that can I use?

Like...

(if (not eq (car L1) (car L2)))

Any help would be much appreciated!

Upvotes: 1

Views: 479

Answers (1)

Amir Afghani
Amir Afghani

Reputation: 38531

This should work:

(not (eq (car L1) (car L2)) 

Upvotes: 5

Related Questions