logoalt Hacker News

Jtsummerstoday at 2:04 AM1 replyview on HN

> Similarly in Lisp, (a list-oriented language) both functions and arrays are lists.

In which Lisp? Try this in Common Lisp and it won't work too well:

  (let ((array (make-array 20)))
    (car array))
What is the car of an array? An array in Lisp (since Lisp 1.5 at least, I haven't read earlier documentation) is an array, and not a list. It does not behave as a list in that you cannot construct it with cons, and you cannot deconstruct it with car or cdr.

Replies

hekkletoday at 2:49 AM

To quote John McCarthy "Since data are list structures and programs are list structures, we can manipulate programs just like data."

Yes, I know most people consider it to be a functional language, and some variants like 'common lisp' make that more explicit, but the original concept was markedly different.