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:
(DEFUN FACTORIAL (X) (IF (= X0) 1 (* 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.
More from this Section
Variable is a computer programming term which refers to a named memory location (storage) ...
- Programming Language
Programming Language is a language used to give instructions to computers. Which means ...
- Object-Oriented Programming
Object-oriented programming (OOP) is defined as a concept of programming based on objects in ...
An object in object-oriented programming is a complex data structure along with ...
- OOP Class
OOP Class is the short form for Object-Oriented Programming Class in the highly popular ...