liveBook · Manning

Lifting

Also called lift

Lifting is the transformation of a value, function, or operation so it can participate in computations within a computational context.

How 3 Manning books explain it

Functional Programming in JavaScript

The transformation of a value or operation into a context so it can participate in computations of that context.

How it is used
Uses lifting to apply ordinary functions safely within Maybe-based error-handling computations.
How deep it goes
Defines lifting with a small JavaScript helper and connects it to containers, map, and monadic data flow.
Examples
Demonstrates lift with Maybe.fromNullable, console.log, composition, and safe object lookup.
What you can do after
Apply lifting to keep nullable results inside Maybe and compose functions without explicit null checks.

Read how Functional Programming in JavaScript explains lifting →

Functional Design and Architecture: Examples in Haskell

lift is a monad-transformer operation that embeds an action from an underlying monad into a transformed monad.

How it is used
Adapts IO and lower-layer state actions for execution inside StateT-based application scripts.
How deep it goes
Demonstrates single and double lifting with typed Minesweeper and ship-control stacks, while deferring implementation internals.
Examples
Uses Minesweeper board updates, nested score and board state, and spaceship rotation scripts.
What you can do after
Build it from scratch by embedding underlying actions and running them through layered StateT computations.

Read how Functional Design and Architecture: Examples in Haskell explains lifting →

Data-Oriented Programming in Java

Lifting is a functional programming technique that adapts a function on ordinary values to operate within a wrapper or computational context.

How it is used
Uses lifting to apply ordinary functions to Optional values without scattering presence checks through application code.
How deep it goes
Derives generic binary lifters and shows explicit and flatMap/map implementations, focusing on Optional rather than broader computational contexts.
Examples
Demonstrates lifted integer addition and string concatenation with present and absent Optional operands.
What you can do after
Apply it via generic lifters that reuse ordinary functions while automatically propagating Optional absence.

Read how Data-Oriented Programming in Java explains lifting →

Also covered in

What to know first

Related concepts

Questions about lifting

What is lifting?

Lifting is the transformation of a value, function, or operation so it can participate in computations within a computational context.

Which Manning books explain lifting?

Functional Programming in JavaScript, Functional Design and Architecture: Examples in Haskell and Data-Oriented Programming in Java.

What should I know before learning lifting?

Manning books that teach lifting usually introduce functor, function, state and monad first.

What is lifting also called?

Lifting is also called lift.

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.