Common Lisp! John Paxton Montana State University Summer 2003.

Slides:



Advertisements
Similar presentations
The Physical Features of North America
Advertisements

Bodies of Water Ch. 1, Lesson 3.
Physical Geography of the United States and Canada
Functional Programming COMP2003 A course on functional programming using Common Lisp Dr Eleni Mangina
ITERATIVE CONSTRUCTS: DOLIST Dolist is an iterative construct (a loop statement) consisting of a variable declaration and a body The body states what happens.
Common Lisp! John Paxton Montana State University Summer 2003.
What can you say about the geography in English…?
Physical landforms of the U.S.
North America Geography and Physical Features
PHYSICAL GEOGRAPHY OF US AND CANADA.  Canada is the second largest country in the world, after Russia  It has more coastal land than any other country.
8 Regions of the United States
Physical Features of the United States
10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Landforms.
United States Landforms for 4 th grade. Great Lakes Lake Superior Lake Huron Lake Ontario Lake Erie Lake Michigan.
Physical Features of the United States
Continental Divides. Definition A high mountain range that separates water flowing into different oceans…the Rocky Mountains in the United States.
Important Physical Features in the United States
Physical Features of the United States
“The Land of the West”. Lesson 1: A Land of Mountains Main Idea: The land of the West includes many mountains. Places: Rocky Mountains, Continental Divide,
Geographic features that shaped the identity of the United States US History.
GeographicalRegionsGeographicalRegions GeographicalRegionsGeographicalRegions SOL I.2b.
United States & Canada Unit 2 – Physical Characteristics.
Good morning!! Sit down!!! 2. Take out a piece of paper
Iteration Chapters 6 & 7. Iteration in LISP n LISP (unlike Prolog) allows iteration –mapcar, remove-if(-not), count-if, find-if for special purpose iteration.
Physical Geography of the United States and Canada.
Social Studies Map Skills
Geographic Features of the U.S. Places to Know. Mountains APPALACHIAN MTNS: Stretch from Maine to Georgia along East Coast APPALACHIAN MTNS: Stretch from.
Chapter 4:The United States and Canada:Physical Geography
Additional Vocabulary for Chapter 4 1. Continental Divide 2. Watershed 3. Rain Shadow.
Chapter 1 Lessons 3 & 4. Largest inlets 1.Ocean 2.Lake 3.Tributary 4.Gulf.
GEOGRAPHY QUIZ 1.What type of map can show the population of an area? 2.T or F: A political map shows locations of boundaries. 3.Name 2 things that determine.
Chapter 6.  Let’s think of the United States and Canada as one big chunk of ground.  If that is the case, what lies to the north? What lies to the south?
The Louisiana Purchase
The World Around Us Unit 2. Lesson One Maps and Locations Location- maps show where something is.
DOG week th grade.
© 2006 Doug Clarke Drop That Bubble!!! Guess the missing idea, then drop that bubble! It might be the main idea… or a smaller idea!
What region would you most likely find the land looking like this?
Physical Geography of United States and Canada. Landforms Mountains on east and west edges of both United States and Canada Rocky mountains link the U.S.
Physical and Man-made Features of the United States
Civics.  MqsC92SxcA Civics.
USA Questions. What is the capital city of the USA?
Draw a house on your notes. - North America United States &Canada.
Jeopardy $100 Topic 1Topic 2Topic 3Topic 4Riddles $200 $300 $400 $500 $400 $300 $200 $100 $500 $400 $300 $200 $100 $500 $400 $300 $200 $100 $500 $400.
United States Geography Physical & Man-Made Man-MadeFeatures.
United States and Canada Landforms NEXT Continued... The Eastern Lowlands Atlantic Coastal Plain - Delaware to Florida Gulf Coastal Plain goes from Florida,
Physical Features of the United States – 4th – 08/09
Lesson 1-3 Notes: Bodies of Water
Physical Geography of North America
Chapter 12 “The Land of the West”.
Maxim Bulgakov 7V. Country and people.
Jeopardy Final Jeopardy Topic 1 Topic 2 Topic 3 Topic 4 Bonus
Regions of the United States
Defining: Geography Terms
A region is a large area that has common
The United States and Canada
Physical Features of the United States
The Geography of Latin America.
U.S. GEOGRAPHY.
Chapter 1 – Geography of the United States
Geographic Regions Review
A - Pacific Ocean B - Gulf of Mexico C - Atlantic Ocean
United States Landforms
Physical Geography of the United States and Canada
What is this part of the map called? What is it used for?
Jaywalking citizenship
Do you know all of the landforms?
Welcome to the Wild West!
The Physical Features of North America
Think about it… Take 5 minutes to work on the paper on your desk. Don’t use your notes!!!
Presentation transcript:

Common Lisp! John Paxton Montana State University Summer 2003

Montana Geography The continental divide runs through the state of Montana in the Rocky Mountains. On the west, water flows to the Pacific Ocean. On the east, water flows to the Gulf of Mexico. The longest undammed river in the U.S., the Yellowstone River, is in Montana.

Montana Statehood Montana was the 41 st state to join the United States. It did so in Bannock was the territorial capitol.

Iteration dotimes dolist do do*

dotimes > (setf sum 0) 0 > (dotimes (i 10 sum) (setf sum (+ sum i)) ) 45

dotimes Question. Write a function that computes the Fibonacci numbers using dotimes. Question. Compile the above function and run it.

dolist > (setf sum 0) 0 > (dolist (item '(1 2 3) sum) (setf sum (+ sum item)) ) 6

dolist Question. Write a function called my- mapcar that is equivalent to mapcar. The function should use the dolist construct.

do (do ( (local-variable-1 initial-value update) … (local-variable-n initial-value update) ) (termination-test intermediate-forms result) loop-body )

do > (do ( (sum 0) (counter 0 (+ 1 counter)) ) ( (>= counter 10) sum ) (setf sum (+ sum counter)) ) 45

do Question: Write a function that computes the Fibonacci numbers using do.

do* do* works just like do. The only difference is that the local variables are assigned initial values and updated in sequence instead of in parallel.

do* Question: Write a function that computes the Fibonacci numbers using do*.