liveBook · Manning

Map

An operation that applies a function to values in a collection or computational context, producing corresponding results while preserving the collection or context’s structure.

How 8 Manning books explain it

Spring in Action, Sixth Edition

map is a Project Reactor operator that transforms each value emitted by a reactive publisher into another value while preserving the publisher type.

How it is used
Transforms emitted values inside Reactor pipelines for typed results in security lookup and reactive order aggregation.
How deep it goes
Defines synchronous per-item mapping, demonstrates typed transformations, and contrasts flatMap() when a transformation returns a publisher.
Examples
Tests basketball-player name conversion with StepVerifier and reassembles TacoOrder aggregates from repository-emitted tacos.
What you can do after
Apply it via Reactor's Flux and Mono to transform values into types required by downstream services.

Read how Spring in Action, Sixth Edition explains map →

Learn Haskell by Example

map is a standard Haskell function that applies a function independently to every element of a list and returns the resulting list.

How it is used
Applies a per-element transformation across strings and lists in cipher, input-processing, and formatting tasks.
How deep it goes
Defines ordered element-wise list transformation and demonstrates composition, while deferring any implementation of `map` itself.
Examples
Uses Caesar and ROT13 ciphers, uppercase console input, and nested `show` and `length` transformations for line numbering.
What you can do after
Apply it via Haskell's `map` to transform every element of a list while keeping element logic separate.

Read how Learn Haskell by Example explains map →

Clojure: The Essential Reference

map is a Clojure function that applies a function to corresponding elements of one or more collections and returns a lazy sequence of results.

How it is used
Transforms corresponding elements of sequentially iterable collections in functional data pipelines.
How deep it goes
Details three arity patterns, lazy results, shortest-input termination, and the caveat against relying on once-only side effects.
Examples
Demonstrates negating a range, combining strings from uneven collections, and assigning indices to keywords.
What you can do after
Apply it via Clojure’s map to transform one or several collections, or use its collection-free arity as a transducer.

Read how Clojure: The Essential Reference explains map →

D3.js in Action, Third Edition

The JavaScript map() method creates a new array by applying a callback to every element of an input array.

How it is used
Transforms loaded datasets into arrays of values needed for data wrangling and visualization.
How deep it goes
Defines callback-based array transformation with working results, but stops short of broader array and object manipulation techniques.
Examples
Uses employee names and dataset years as mapped arrays for labels, scale domains, and chart positioning.
What you can do after
Apply it via JavaScript to reshape array data for D3 scales and other visualization operations.

Read how D3.js in Action, Third Edition explains map →

Secrets of the JavaScript Ninja, Second Edition

An Array method that creates a new array by applying a callback to each element.

How it is used
Uses map to transform array items into a new array as one common array operation.
How deep it goes
Defines callback-based transformation and demonstrates extracting object properties, without detailing further mechanics.
Examples
Extracts weapon names from an array of ninja objects and compares map with forEach and push.
What you can do after
Apply Array.map to transform an array of objects into an array of their weapon properties.

Read how Secrets of the JavaScript Ninja, Second Edition explains map →

F# in Action: A Revised Edition of Get Programming with F#

A map operation applies a function to a value inside a computational effect and rewraps the result in that effect.

How it is used
Transforms values inside List, Option, Result, and Task while preserving their surrounding effect.
How deep it goes
Explains map through its generic signature, list use, and effect-specific handling, while deferring implementations to open-source code.
Examples
Uses integer-to-string list conversion, a timesTwo formatter, customers’ orders, and chained division results.
What you can do after
Apply it via List.map, Option.map, Result.map, or Task.map to reuse ordinary transformations across effects.

Read how F# in Action: A Revised Edition of Get Programming with F# explains map →

Apache Kafka in Action

map is a stream-processing function that transforms each input record into a new record or value.

How it is used
Transforms records in real-time stream-processing topologies, especially when both message key and value must change.
How deep it goes
Defines input/output signatures, contrasts mapValues(), and explains repartitioning-related performance loss without detailing implementation internals.
Examples
Demonstrates dollar-to-cent conversion with mapValues() and key creation from an unkeyed Apple price record.
What you can do after
Apply it via Kafka Streams to transform records, create keys, and write the resulting stream to a topic.

Read how Apache Kafka in Action explains map →

Fabulous Adventures in Data Structures and Algorithms

A monadic map operation applies a function to values inside a monadic computational context while preserving that context's structure.

How it is used
Transforms ordinary functions into operations over monadic workflows while preserving capabilities such as laziness, nullability, asynchrony, and sequencing.
How deep it goes
Defines Map, implements it for Lazy<T>, relates it to Bind and Unit, and stops short of detailed implementations for every context.
Examples
Uses Lazy<int>, DivTwo, Nullable<T>, Task<T>, IEnumerable<T>, and the nested Lazy<Lazy<double>> problem.
What you can do after
Apply Map to lift ordinary functions into lazy, nullable, asynchronous, or sequence-based workflows and recognize when Bind is required.

Read how Fabulous Adventures in Data Structures and Algorithms explains map →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.