allow eq function to compare equivalent types

hey robfig,

like i promised here is the "eq" function.
i was in a hurry and couldn't test as thoroughly as i wanted to.

Greetings

Shaban