Class 21 Objectives


At the end of today's class you should

KNOW:

BE ABLE TO:

Sample Exam Question:

A database of college students staying in residence halls is made up of a list of structs with the following format:

;; Student is a (make-student String Symbol Number String)
(define-struct student(name gender age id))
The college has changed their student-id system, and now all ids must start with the characters "00". Using map, write a function update-ids that consumes a ListOfStudent and produces a ListOfStudent, where the id of each student in the list now has the prefix "00".

(DrRacket has a built-in function called string-append that might be useful. string-append consumes two strings and produces the string obtained by appending the second string to the first.)