Lisp Programming

LISP (List Processor) a programming language developed in the late 1950s at MIT under the direction of John McCarthy. Because of the ease with which it can handle complex data structures, Lisp is used for artificial intelligence research and for writing programs whose complexity would render them unmanageable in other languages.

A Lisp program is easy to recognize because of the accumulation of closing parentheses at the end of the program. All Lisp statements and most Lisp data structures are linked lists, written as lists of elements in parentheses. Programmers build a complete program by defining their own statements (actually functions) in terms of those previously defined.

For example, a function that computes the factorial of X is:

 (IF (= X0)
     (* FACTORIAL(-X 1))))

Translating into English: “This is the definition of a function called FACTORIAL whose parameter is X. If X is zero, its factorial is 1; otherwise, its factorial is equal to X times the factorial of X – 1.” The IF keyword works like a Pascal if-then-else statement. This function calls itself recursively; recursion is a normal way of expressing repetition in Lisp.

Share it:  Cite

More from this Section

  • Data Types
    Generally data types refer to the classification of various types of data that a computer ...
  • Procedural programming
    Procedural programming is a concept of programming that specifies a ...
  • Encapsulation
  • C# Programming
    C# (pronounced “C sharp”) a programming language developed by Anders Hejlsberg (the ...
  • ASP (Active Server Pages)
    ASP (Active Server Pages) on Windows web servers, a system for generating web pages partly ...