CSE 341 Lecture 2
lists and tuples; more functions; mutable state Ullman 2.4.1, 2.4.3; 3 - 3.2; 2.3
slides created by Marty Stepp http://www.cs.washington.edu/341/
CSE 341 Lecture 2 lists and tuples; more functions; mutable state - - PowerPoint PPT Presentation
CSE 341 Lecture 2 lists and tuples; more functions; mutable state Ullman 2.4.1, 2.4.3; 3 - 3.2; 2.3 slides created by Marty Stepp http://www.cs.washington.edu/341/ Comments (* comment text *) (* Computes n!, or 1*2*3*...*n-1*n.
slides created by Marty Stepp http://www.cs.washington.edu/341/
– Does tl copy the list, or use a reference? Does it matter?
equivalent to [element] @ list
val names = [("Hillary", "Clinton"), ("Barack", "Obama"), ("Joseph", "Biden")];
["Clinton, Hillary", "Obama, Barack", "Biden, Joseph"];
– convert e into "last, first" format. – append e onto result list.
– convert e into "last, first" format. – append e onto result list.