Join Nostr
2026-02-23 15:04:58 UTC

Simon Brooke on Nostr: SBCL #CommonLisp (nth 2 '(1 2 3 4 5 6)) 3 #Clojure (nth '(1 2 3 4 5 6) 2) 3 #Scheme ...

SBCL #CommonLisp
(nth 2 '(1 2 3 4 5 6))
3

#Clojure
(nth '(1 2 3 4 5 6) 2)
3

#Scheme
(list-ref '(1 2 3 4 5 6) 2)
;Value: 3

So, they differ on the name of the function and the order of the arguments, but they all agree on zero-indexing the first element of a list.

This seems perverse to me. Surely the index of the first element should be 1, the second, 2, and so on?

Argue against me -- and please give an argument which is not just **TRADITION!**

#Lisp