On Thu, Dec 29, 2022 at 01:47:57AM +0300, Jean Louis wrote: [...] > > (And no reason to quote either () or a literal string.) > > There was reason. See here: > > (setq my-list '()) > (benchmark 1000 (setq my-list (cons "Word" my-list))) > > Debugger entered--Lisp error: (invalid-function "Word") > ("Word") > (closure (t) nil ("Word"))() [...] > but then `benchmark` worked only first time, second time it gave > error. Read benchmark's doc string carefully :-) Benchmark is a /function/, so its argument is evaluated first. By the Rule of Lisp [1], args are evaluated first... (benchmark (cons "Word" my-list)) => (benchmark ("Word")) => ; since list is empty ... and then it tries to evaluate the function application ("Word"), which explains your error message. If now you look again at the benchmark's docstring it says to provide a form. This means you have to quote the whole thing like so: (benchmark 1000 '(setq my-list (cons "word" my-list))) If you just quote "Word", you are benchmarking the wrong thing, anyway :) Cheers [1] aka "strict order evaluation" https://en.wikipedia.org/wiki/Evaluation_strategy#Strict_evaluation -- t