New answers tagged


(defun sum-numbers (n &rest L) (let ((a 0)) (if (not L) n (dolist (x L a) (if (integerp x) (setq a (+ x a)))) (setq a (+ a n))))) an other solution using a sequence function: (defun sum-numbers (n &rest L) (apply #'+ (cons n (seq-filter #'integerp L))))


One way is to use an interactive code to prompt you for the function. (defun simple-function (input-function) (interactive "aInput function: ") (dotimes (counter 10) (funcall input-function))) then you can write your own input like this perhaps, even using the counter variable from your loop. (defun myfunc () (message "%s: %s" ...

Top 50 recent answers are included