I do not understand the UnsameQ[]
behavior below. (I need UnsameQ[]
as I may have variables in the array.)
{-7, 3, 2} /. x_ /; x == 3 -> w
(*{-7, w, 2}*)
{-7, 3, 2} /. x_ /; x != 3 -> w
(*{w, 3, w}*)
{-7, 3, 2} /. x_ /; x === 3 -> w
(*{-7, w, 2}*)
{-7, 3, 2} /. x_ /; x =!= 3 -> w
(*w*)
Thank you.