List is the second oldest programming language created in 1958 John McCarthy on MIT. Yet, is it surprisingly advanced and modern, due to its mathematical foundation and clean implementation.
By why bother looking at this now, not just for "theory?" Among other reasons, Web Assembly, arguably a foundation of next wave of computing platform after containers, is using same S-expression syntax and semantics from Lisp!
Brendan Eich ... originally intending to put Scheme "in the browser", but his Netscape superiors insisted that the language's syntax resemble that of Java. As a result, Eich devised a language that had much of the functionality of Scheme, the object-orientation of Self, and the syntax of Java.
Common Lisp (lisp-lang.org)
LISP Tutorial @tutorialspoint
The name LISP derives from "LISt Processor". Linked lists are one of Lisp's major data structures, and Lisp source code is made of lists. Thus, Lisp programs can manipulate source code as a data structure, giving rise to the macro systems that allow programmers to create new syntax or new domain-specific languages embedded in Lisp.
The interchangeability of code and data gives Lisp its instantly recognizable syntax. All program code is written as s-expressions, or parenthesized lists. A function call or syntactic form is written as a list with the function or operator's name first, and the arguments following; for instance, a function
f that takes three arguments would be called as
(f arg1 arg2 arg3).
Scheme was created during the 1970s at the MIT AI Lab and released by its developers, Guy L. Steele and Gerald Jay Sussman, via a series of memos now known as the Lambda Papers. It was the first dialect of Lisp to choose lexical scope and the first to require implementations to perform tail-call optimization, giving stronger support for functional programming and associated techniques such as recursive algorithms. It was also one of the first programming languages to support first-class continuations. It had a significant influence on the effort that led to the development of Common Lisp.
(free online) books
ANSI Common Lisp by Paul Graham
Structure and Interpretation of Computer Programs, by Abelson, Sussman, and Sussman.
examples of List code
n * n factorial - n
WebAssembly (sometimes abbreviated Wasm) is an open standard that defines a portable binary-code format for executable programs, and a corresponding text format, as well as interfaces for facilitating interactions between such programs and their host environment. The main goal of WebAssembly is to enable high-performance applications on web pages, but the format is designed to be executed and integrated in other environments as well, including standalone ones.
;; recursive, refactored to use s-expressions and named variables
(func $fact_f64 (export "fact_f64") (param $n f64) (result f64)
(if (result f64) (f64.lt (get_local $n) (f64.const 1))
(then f64.const 1)
(call $fact_f64 (f64.sub (get_local $n) (f64.const 1)))