Lisp by Namtap Tapchareon 49540511. Lisp Background  Lisp was developed by John McCarthy in 1958.  Lisp is derives from List Processing Language. 

Slides:



Advertisements
Similar presentations
Lisp. Versions of LISP Lisp is an old language with many variants Lisp is alive and well today Most modern versions are based on Common Lisp LispWorks.
Advertisements

C-LISP. LISP 2 Lisp was invented by John McCarthy in 1958 while he was at the Massachusetts Institute of Technology (MIT).John McCarthyMassachusetts Institute.
1 Copyright © 1998 by Addison Wesley Longman, Inc. Chapter 14 Functional Programming Languages - The design of the imperative languages is based directly.
Lists in Lisp and Scheme a. Lists are Lisp’s fundamental data structures, but there are others – Arrays, characters, strings, etc. – Common Lisp has moved.
Lisp II. How EQUAL could be defined (defun equal (x y) ; this is how equal could be defined (cond ((numberp x) (= x y)) ((atom x) (eq x y)) ((atom y)
1 Programming Languages and Paradigms Lisp Programming.
Lisp II. How EQUAL could be defined (defun equal (x y) ; this is how equal could be defined (cond ((numberp x) (= x y)) ((atom x) (eq x y)) ((atom y)
CS 355 – PROGRAMMING LANGUAGES Dr. X. Apply-to-all A functional form that takes a single function as a parameter and yields a list of values obtained.
1-1 An Introduction to Scheme March Introduction A mid-1970s dialect of LISP, designed to be a cleaner, more modern, and simpler version than.
LISP Programming. LISP – simple and powerful mid-1950’s by John McCarthy at M.I.T. “ LIS t P rocessing language” Artificial Intelligence programs LISP.
PZ10CX Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ10CX - LISP Programming Language Design and Implementation.
Functional Programming Languages
Defining functions in lisp In lisp, all programming is in terms of functions A function is something which –takes some arguments as input –does some computing.
Lisp. Versions of LISP Lisp is an old language with many variants –LISP is an acronym for List Processing language Lisp is alive and well today Most modern.
CS 330 Programming Languages 11 / 20 / 2007 Instructor: Michael Eckmann.
Chapter 15 Functional Programming Languages. Copyright © 2007 Addison-Wesley. All rights reserved. 1–2 Introduction Design of imperative languages is.
ISBN Chapter 15 Functional Programming Languages Mathematical Functions Fundamentals of Functional Programming Languages Introduction to.
Scheme examples. Recursion Iteration is achieved via recursion Selection is achieved via COND Review the following examples to learn to think recursively.
Functional programming: LISP Originally developed for symbolic computing First interactive, interpreted language Dynamic typing: values have types, variables.
ISBN Chapter 15 Functional Programming Languages.
ISBN Chapter 15 Functional Programming Languages.
Recursion. Definitions I A recursive definition is a definition in which the thing being defined occurs as part of its own definition Example: A list.
COMP 205 – Week 11 Dr. Chunbo Chu. Intro Lisp stands for “LISt Process” Invented by John McCarthy (1958) Simple data structure (atoms and lists) Heavy.
Lisp: a history Developed by John McCarthy in the 1950’s. Developed by John McCarthy in the 1950’s. Only Fortran has higher “seniority” Only Fortran has.
The College of Saint Rose CIS 433 – Programming Languages David Goldschmidt, Ph.D. from Concepts of Programming Languages, 9th edition by Robert W. Sebesta,
1 Lists in Lisp and Scheme. 2 Lists are Lisp’s fundamental data structures. Lists are Lisp’s fundamental data structures. However, it is not the only.
Basic Lisp CIS 479/579 Bruce R. Maxim UM-Dearborn.
1 Lisp Functions –Built-in functions –Defining functions –Function Evaluation and Special Forms defun, if Control statements –Conditional if, cond –Repetition.
CSC3315 (Spring 2009)1 CSC 3315 Programming Paradigms Scheme Language Hamid Harroud School of Science and Engineering, Akhawayn University
ISBN Chapter 15 Functional Programming Languages.
CSE 341, S. Tanimoto Lisp Defining Functions with DEFUN Functions are the primary abstraction mechanism available in Lisp. (Others are structures.
CS 403: Programming Languages Lecture 6 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
COP4020 Programming Languages Functional Programming Prof. Xin Yuan.
ISBN Chapter 15 Functional Programming Languages.
Lisp Functional Language or Applicative Language –Achieves its effect by applying functions, either recursively or through composition Powerful, expressive,
ISBN Chapter 15 Functional Programming Languages.
ISBN Chapter 15 Functional Programming Languages.
ISBN Chapter 15 Functional Programming Languages.
1 Chapter 15 © 2002 by Addison Wesley Longman, Inc Introduction - The design of the imperative languages is based directly on the von Neumann architecture.
ISBN Chapter 15 Functional Programming Languages.
LISP Data Types Functional Programming Academic Year Alessandro Cimatti
CS 331 Lisp/Scheme 1 Lisp/Scheme Ruth Rutter Functional and Logic Programming Team P-Phunck.
Scheme Profs Tim Sheard and Andrew Black CS 311 Computational Structures.
Milos Hauskrecht (PDF) Hieu D. Vu (PPT) LISP PROGARMMING LANGUAGE.
Lisp "List Processing". Lisp history John McCarthy developed the basics behind Lisp during the 1956 Dartmouth Summer Research Project on Artificial Intelligence.
1 FP Foundations, Scheme In Text: Chapter Chapter 14: FP Foundations, Scheme Mathematical Functions Def: A mathematical function is a mapping of.
Functional Programming Part 1. Organization of Programming Languages-Cheng Big Picture u What we’ve learned so far: Imperative Programming Languages 
ISBN Chapter 15 Functional Programming Languages.
Comparative Programming Languages Functional programming with Lisp/Scheme.
Ch Ch jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (n-n-n-notes) Summer 2003 Dr. Carter Tiernan.
Functional Programming Languages
Functional Programming Languages
Functional Programming
Modern Programming Languages Lecture 20 Fakhar Lodhi
Organization of Programming Languages
CS 326 Programming Languages, Concepts and Implementation
Chapter 15 – Functional Programming Languages
(Functional Programming) Reference: R.Sebesta, Chapter 15
Functional Programming Languages
PZ10CX - LISP Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section Appendix A.6.
FP Foundations, Scheme In Text: Chapter 14.
Functional Programming Languages
Lisp Tutorial Click on Xlisp icon – you enter the interpreter
Lisp and Scheme I.
Defining Functions with DEFUN
Abstraction and Repetition
Modern Programming Languages Lecture 18 Fakhar Lodhi
15.2 Mathematical Functions
Lisp.
Lists in Lisp and Scheme
Presentation transcript:

Lisp by Namtap Tapchareon

Lisp Background  Lisp was developed by John McCarthy in  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.  Lisp is the second-oldest high-level programming language.

Descendants of Lisp  Two dialects of LISP are now commonly used are Scheme and Common Lisp

Scheme  Scheme is suited to educational application such as courses in functional programming and general introductions to programming

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

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.

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.

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 ) )

Resources  Concepts of Programming Languages seventh edition by Robert W. Sebesta  gramming_language