Comment

Comment by abecedarius

That original post started with

> (list 1 2 3) == (cons 1 (cons 2 (cons 3 nil)))

and I'd have answered that cons could be a variable-arity function such that

> (list 1 2 3) == (cons 1 2 3 nil)

and maybe that'd help this newbie's intuition. (Common Lisp does have this variable-arity cons but by a different name list*, for some reason.)

parent abecedarius 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton