0

First example:

(defun first (a)
    '(a 1))
(first 2) => (a 1)

Second example:

(defun second (b)
    (+ b 1))
(second 1) => 2

How can I get (2 1) with (first 2)?

Drew
  • 75,699
  • 9
  • 109
  • 225
Valeriy
  • 377
  • 4
  • 16
  • 3
    I strongly recommend reading this Q&A regarding the dangers of your initial approach: https://emacs.stackexchange.com/q/20535 – phils Apr 23 '17 at 10:53

1 Answers1

0

Code:

(defun first (a)
    (list a 1))
(first 2)

Result:

(2 1)
Valeriy
  • 377
  • 4
  • 16