1 / 10

Lisp by Namtap Tapchareon 49540511

Lisp by Namtap Tapchareon 49540511. Lisp Background. Lisp was developed by John McCarthy in 1958. Lisp is derives from List Processing Language. The first version of Lisp is called “Pure Lisp”. Description of Lisp. Lisp is a functional programming language .

yana
Télécharger la présentation

Lisp by Namtap Tapchareon 49540511

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LispbyNamtap Tapchareon49540511

  2. Lisp Background • Lisp was developed by John McCarthy in 1958. • Lisp is derives from List Processing Language. • The first version of Lisp is called “Pure Lisp”.

  3. Description of Lisp • Lisp is a functional programming language. • Lisp is the second-oldest high-level programming language.

  4. Descendants of Lisp • Two dialects of LISP are now commonly used are Scheme and Common Lisp

  5. Scheme • Scheme is suited to educational application such as courses in functional programming and general introductions to programming

  6. Common Lisp • Common Lisp was created in an effort to combined the features of several dialects of Lisp.

  7. Language Structure • Lisp has only two kinds of data structure: atoms and lists. • Atoms are either symbols, which have the form of identifiers or numeric literals. • Lists are specified by delimiting their elements with parentheses.

  8. Syntax • Lisp's syntax is a model of simplicity.Program and data have exactly the same form: parenthesized lists. • For example : ( A B C D ) When interpreted as data, it is a list of four elements. When viewed as code, it is the application of the function named A to the three parameters B C and D.

  9. Examples • The following code defines a Lisp predicate function that take two lists as arguments and returns true if the two lists are equal, and NIL (false) otherwise. ( DEFUN equal_lists ( lis1 lis2 ) ( COND ( ( ATOM lis1 ) ( EQ lis1 lis2 ) ) ( ( ATOM lis2 ) NIL ) ( ( equal_lists ( CAR lis1 ) ( CAR lis2 ) ) ( equal_lists ( CDR lis1 ) ( CDR lis2 ) ) ) ( T NIL ) ) )

  10. Resources • Concepts of Programming Languages seventh edition by Robert W. Sebesta • http://en.wikipedia.org/wiki/Lisp_programming_language

More Related