4. Mapping and Filtering

Overview

In this chapter, we will begin our exploration of how to use sequential collections in Clojure by taking a look at two of the most useful patterns: mapping and filtering. We will work with the map and filter functions and handle sequential data without using a for loop. We will also use common patterns and idioms for Clojure collections and take advantage of lazy evaluation while avoiding the traps. We will load and process sequential datasets from Comma-Separated Values (CSV) files and extract and shape data from a large dataset.

By the end of this chapter, you will be able to parse datasets and perform various types of transformations to extract and summarize data.

Introduction

Dealing with collections ...

Get The Clojure Workshop now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.