flâneur — a map of the web's best reading

CSC 151 - The "big three" list operations

eikmeier.sites.grinnell.edu · 2,540 words · saved by 1 readers

We’ve started to see some significant power in using two “higher order” list operations, map and apply. These are called “higher order” procedures because they take procedures as inputs. map is particularly useful for a variety of reasons. First, it lets us do a form of repetition: We use map to repeatedly apply a procedure to different values (the elements of the list or lists we map over). But it’s more than that. Experience suggests that using map leads to a different way of thinking about repetition than other mechanics found in other languages such as “for loops”. (Don’t worry if you’ve never heard of for loops. You’ll learn about them in another CS class.) More importantly, map permits some cool implementations. Since map does not specify the order in which the elements are processed, one can implement map so that all (or at least many) of the applications can be done at the same time. (Computer scientists say “in parallel”.) As we start to reach the limits on the speed of one pr

CSC 151 - The "big three" list operations The "big three" list operations Due Wednesday, 17 September 2025 --> Summary We continue our exploration Racket’s list data type, focusing on “the big three” list processing operations: map , filter , and reduce . Prerequisites An abbreviated introduction to Scheme . Data types . Writing your own procedures . List Basics . Anonymous Procedures . We’ve started to see some significant power in using two “higher order” list operations, map and apply . These are called “higher order” procedures because they take procedures as inputs. map is particularly us

Explore this link on the map →

saved by

related reading