CS Behind the Curtain (CS195 2003S)
Primary:
[Front Door]
[Current]
[Glance]
-
[Blurb]
[Disabilities]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Misc:
[Walker/Fall 2001]
[SamR]
Back to Reading Gries. On to A List Wrapper (1).
Held: Monday, 7 April 2003
Summary: Today we begin our consideration of how to implement Scheme-like lists, which are generally called linked lists.
Related Pages:
Assignments:
a collection of values that you can step through one-by-one. I will ask you for your answer tomorrow.
Notes:
Overview:
typedef struct node {
int datum;
struct node *next;
} node;
node *empty_list() {
return null;
} /* empty_list() */
/* Note: cons returns NULL if it fails. */
node *cons(int val, node *next) {
node *new_node = (node *) malloc(sizeof(node));
if (new_node == (node *) NULL)
return new_node;
new_node->datum = val;
new_node->next = next;
return new_node;
} /* cons(int, node *) */
/* The rest left for discussion. */
Tuesday, 7 January 2003 [Samuel A. Rebelsky]
Sunday, 6 April 2003 [Samuel A. Rebelsky]
Back to Reading Gries. On to A List Wrapper (1).
Primary:
[Front Door]
[Current]
[Glance]
-
[Blurb]
[Disabilities]
[Honesty]
[Instructions]
[Links]
[Search]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
ECA:
[About]
[Grades]
[Quizzes]
[Submit Work]
[Change Password]
[Reset Password]
Misc:
[Walker/Fall 2001]
[SamR]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Fri May 2 14:20:57 2003.
The source to the document was last modified on Sun Apr 6 23:20:13 2003.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS195/2003S/Outlines/outline.37.html.
You may wish to
validate this document's HTML
;
;
Check with Bobby