SlideShare a Scribd company logo
CSE240 – Introduction to
Programming Languages
Lecture 21:
Programming with LISP| Data Structures
Javier Gonzalez-Sanchez
javiergs@asu.edu
javiergs.engineering.asu.edu
Office Hours: By appointment
Quiz
Work in teams of 1 to 3
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 3
Solve 5 of the following problems
1. A function test-min that returns the lower value in a List of numbers
(test-min L)
2. A function test-average that returns the average of all values in a List of numbers
(test-average L)
3. A function test-fibonacci that prints the first n elements of the fibonacci series
(test-fibonacci n)
4. A recursive function that returns the leftmost even element in a list of numbers
(test-even L)
5. A functions that traverse a list and returns how many of its elements are 0
(test-count-zeros L)
6. A recursive function that return the N member of a list L (assuming that the
elements are numbered from zero onwards):
(test-get n L)
7. A recursive function that returns non-NIL if x is a member of the list L.
(test-is-in-list x L)
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 4
Instructions
Include for each problem:
a) A comment describing the function
b) The function definition
c) 3 examples of function calls
CSE240 – Introduction to Programming Languages
Javier Gonzalez-Sanchez
javiergs@asu.edu
Fall 2017
Disclaimer. These slides can only be used as study material for the class CSE240 at ASU. They cannot be distributed or used for another purpose.

More Related Content

What's hot (20)

PDF
Lecture4
Mohamed Awni
 
PPTX
Presentation
zohaib arif
 
PPTX
OPERATORS OF C++
ANANT VYAS
 
PPTX
My presentation
Saifur13
 
PDF
Linked lists c7
Omar Al-Sabek
 
PDF
Summary of MATLAB Functions-Part1
Elaf A.Saeed
 
PDF
Algorithms Lecture 6: Searching Algorithms
Mohamed Loey
 
PPTX
Sorting algorithms
Maher Alshammari
 
PPTX
Linerazation of systems
Chandan Taluja
 
PPT
Piecewise Functions
ktini
 
PDF
Python - Lecture 10
Ravi Kiran Khareedi
 
PDF
Algorithms Lecture 8: Pattern Algorithms
Mohamed Loey
 
PDF
Tableau functions
Learnbay Datascience
 
PPT
Piecewise and Step Functions
ktini
 
PPT
Sorting
Ghaffar Khan
 
PPTX
Binary search
Raghu nath
 
PPT
Introduction to lambda calculus
Afaq Siddiqui
 
PDF
computer notes - List implementation
ecomputernotes
 
Lecture4
Mohamed Awni
 
Presentation
zohaib arif
 
OPERATORS OF C++
ANANT VYAS
 
My presentation
Saifur13
 
Linked lists c7
Omar Al-Sabek
 
Summary of MATLAB Functions-Part1
Elaf A.Saeed
 
Algorithms Lecture 6: Searching Algorithms
Mohamed Loey
 
Sorting algorithms
Maher Alshammari
 
Linerazation of systems
Chandan Taluja
 
Piecewise Functions
ktini
 
Python - Lecture 10
Ravi Kiran Khareedi
 
Algorithms Lecture 8: Pattern Algorithms
Mohamed Loey
 
Tableau functions
Learnbay Datascience
 
Piecewise and Step Functions
ktini
 
Sorting
Ghaffar Khan
 
Binary search
Raghu nath
 
Introduction to lambda calculus
Afaq Siddiqui
 
computer notes - List implementation
ecomputernotes
 

Similar to 201801 CSE240 Lecture 21 (20)

PDF
201801 CSE240 Lecture 17
Javier Gonzalez-Sanchez
 
PPT
(Ai lisp)
Ravi Rao
 
PPTX
AI Programming language (LISP)
Dr. SURBHI SAROHA
 
PPT
Advance LISP (Artificial Intelligence)
wahab khan
 
DOCX
ECS140A-F16-07 October 27, 2016ASSIGNMENT 5 LISPDue .docx
SALU18
 
PDF
15 functional programming
jigeno
 
PDF
15 functional programming
jigeno
 
PDF
201801 CSE240 Lecture 26
Javier Gonzalez-Sanchez
 
PDF
Lisp tutorial
Nilt1234
 
PPTX
Funtional Programming
Girish Khanzode
 
PDF
Clqr a4-consec
Benjamin Brown
 
PPT
Lisp and scheme i
Luis Goldster
 
PPTX
Functional Programming.pptx
PremBorse1
 
DOCX
UNIT V.docx
Revathiparamanathan
 
PPT
INTRODUCTION TO LISP
Nilt1234
 
PDF
201801 CSE240 Lecture 16
Javier Gonzalez-Sanchez
 
PPTX
AI UNIT-4 Final (2).pptx
prakashvs7
 
PPTX
Set data structure 2
Tech_MX
 
PPT
FDS- Basic Concepts.ppt
shanthishyam
 
PPTX
Lisp
huzaifa ramzan
 
201801 CSE240 Lecture 17
Javier Gonzalez-Sanchez
 
(Ai lisp)
Ravi Rao
 
AI Programming language (LISP)
Dr. SURBHI SAROHA
 
Advance LISP (Artificial Intelligence)
wahab khan
 
ECS140A-F16-07 October 27, 2016ASSIGNMENT 5 LISPDue .docx
SALU18
 
15 functional programming
jigeno
 
15 functional programming
jigeno
 
201801 CSE240 Lecture 26
Javier Gonzalez-Sanchez
 
Lisp tutorial
Nilt1234
 
Funtional Programming
Girish Khanzode
 
Clqr a4-consec
Benjamin Brown
 
Lisp and scheme i
Luis Goldster
 
Functional Programming.pptx
PremBorse1
 
UNIT V.docx
Revathiparamanathan
 
INTRODUCTION TO LISP
Nilt1234
 
201801 CSE240 Lecture 16
Javier Gonzalez-Sanchez
 
AI UNIT-4 Final (2).pptx
prakashvs7
 
Set data structure 2
Tech_MX
 
FDS- Basic Concepts.ppt
shanthishyam
 
Ad

More from Javier Gonzalez-Sanchez (20)

PDF
201804 SER332 Lecture 01
Javier Gonzalez-Sanchez
 
PDF
201801 SER332 Lecture 03
Javier Gonzalez-Sanchez
 
PDF
201801 SER332 Lecture 04
Javier Gonzalez-Sanchez
 
PDF
201801 SER332 Lecture 02
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 25
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 24
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 23
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 22
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 20
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 19
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 18
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 15
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 14
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 13
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 12
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 11
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 10
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 09
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 08
Javier Gonzalez-Sanchez
 
PDF
201801 CSE240 Lecture 07
Javier Gonzalez-Sanchez
 
201804 SER332 Lecture 01
Javier Gonzalez-Sanchez
 
201801 SER332 Lecture 03
Javier Gonzalez-Sanchez
 
201801 SER332 Lecture 04
Javier Gonzalez-Sanchez
 
201801 SER332 Lecture 02
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 25
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 24
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 23
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 22
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 20
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 19
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 18
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 15
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 14
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 13
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 12
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 11
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 10
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 09
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 08
Javier Gonzalez-Sanchez
 
201801 CSE240 Lecture 07
Javier Gonzalez-Sanchez
 
Ad

Recently uploaded (20)

PDF
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
PPTX
Lec 2 Compiler, Interpreter, linker, loader.pptx
javidmiakhil63
 
PDF
ESUG 2025: Pharo 13 and Beyond (Stephane Ducasse)
ESUG
 
PDF
Message Level Status (MLS): The Instant Feedback Mechanism for UAE e-Invoicin...
Prachi Desai
 
PPTX
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
PDF
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
PPT
24-BuildingGUIs Complete Materials in Java.ppt
javidmiakhil63
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
NSF Converter Simplified: From Complexity to Clarity
Johnsena Crook
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
chapter 5.pdf cyber security and Internet of things
PalakSharma980227
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 31 2025?
utfefguu
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
From spreadsheets and delays to real-time control
SatishKumar2651
 
PPTX
Library_Management_System_PPT111111.pptx
nmtnissancrm
 
PDF
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
PPTX
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
PPTX
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
PDF
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
Lec 2 Compiler, Interpreter, linker, loader.pptx
javidmiakhil63
 
ESUG 2025: Pharo 13 and Beyond (Stephane Ducasse)
ESUG
 
Message Level Status (MLS): The Instant Feedback Mechanism for UAE e-Invoicin...
Prachi Desai
 
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
24-BuildingGUIs Complete Materials in Java.ppt
javidmiakhil63
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
NSF Converter Simplified: From Complexity to Clarity
Johnsena Crook
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
chapter 5.pdf cyber security and Internet of things
PalakSharma980227
 
IDM Crack with Internet Download Manager 6.42 Build 31 2025?
utfefguu
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
From spreadsheets and delays to real-time control
SatishKumar2651
 
Library_Management_System_PPT111111.pptx
nmtnissancrm
 
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
Odoo Migration Services by CandidRoot Solutions
CandidRoot Solutions Private Limited
 
Ready Layer One: Intro to the Model Context Protocol
mmckenna1
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 

201801 CSE240 Lecture 21

  • 1. CSE240 – Introduction to Programming Languages Lecture 21: Programming with LISP| Data Structures Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu Office Hours: By appointment
  • 2. Quiz Work in teams of 1 to 3
  • 3. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 3 Solve 5 of the following problems 1. A function test-min that returns the lower value in a List of numbers (test-min L) 2. A function test-average that returns the average of all values in a List of numbers (test-average L) 3. A function test-fibonacci that prints the first n elements of the fibonacci series (test-fibonacci n) 4. A recursive function that returns the leftmost even element in a list of numbers (test-even L) 5. A functions that traverse a list and returns how many of its elements are 0 (test-count-zeros L) 6. A recursive function that return the N member of a list L (assuming that the elements are numbered from zero onwards): (test-get n L) 7. A recursive function that returns non-NIL if x is a member of the list L. (test-is-in-list x L)
  • 4. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 4 Instructions Include for each problem: a) A comment describing the function b) The function definition c) 3 examples of function calls
  • 5. CSE240 – Introduction to Programming Languages Javier Gonzalez-Sanchez [email protected] Fall 2017 Disclaimer. These slides can only be used as study material for the class CSE240 at ASU. They cannot be distributed or used for another purpose.