Skip to main content
edited tags; edited tags; edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
Source Link

How can i add same value to every item in list, turning it into alist?

I tried to use this code, but it returns (k k k k k)

(mapcar (lambda (x) 'cons x '(k))
        '(a b c d e))

What am i doing wrong here? Why doesn't cons work?