Mapcan operates destructively on the lists returned by the function. Because your function returns a literal list mapcan operates destructively on a literal object. The error will go away if you replace '(even) by (list 'even).