define to_sxp method for Cons class