is_eq(obj1, obj2)
Return true
if obj1
and obj2
are identical,
otherwise return false
.
Two objects are considered identical if they internally reference to the same memory location.
Is_eq
can efficiently check for pointer equivalence of symbols and allocated objects like pairs,
arrays, and record instances.
Is_eq
cannot be used to compare numbers reliably.
Slogan may use different objects internally for representing two big-integers that has the same value.
is_eq('a, 'b)
// false
is_eq('a, 'a)
// true
is_eq(\a, \a)
// true
is_eq(10, 10)
// true
is_eq(38492948403840248034824037496494864917349749247947249749327482479,
38492948403840248034824037496494864917349749247947249749327482479)
// false