Partial
partial is a callable factory that returns a new function with specified arguments pre-applied to an existing function, leaving the remaining arguments variable.
Clojure: The Essential Reference
partial is a Clojure function that returns a function with specified leading arguments pre-applied to a target function.
- How it is used
- Defers function invocation when leading configuration is available before the remaining arguments.
- How deep it goes
- Defines the contract, positional limitation, arity failure, and alternatives, but does not detail implementation internals.
- Examples
- Demonstrates incrementing, string searching, validation over sequences, reusable predicates, and comparisons with fn.
- What you can do after
- Apply partial to build reusable functions and compose configured operations with sequence-processing functions.
Read how Clojure: The Essential Reference explains partial →
Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi
partial is a callable factory that returns a new function with selected positional or keyword arguments of an existing function pre-bound.
- How it is used
- Simplifies reusable robot movement functions by pre-binding direction-specific motor arguments.
- How deep it goes
- Defines argument binding and applies it through a complete motor library, without descending into functools internals.
- Examples
- Demonstrates forward, backward, turning, spinning, a no-operation function, and interactive motor calls.
- What you can do after
- Build reusable robot controls from one movement function while retaining duration and speed arguments.
Read how Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi explains partial →
What to know first
- functionA function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
Related concepts
- functionproduces · A function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
- curryingproduces · Currying is the transformation of a function that accepts multiple arguments into a sequence of functions that accept arguments incrementally, typically one at a time.
- fn?alternative to · fn? is a Clojure predicate that returns true when its argument is a Clojure function.
- partial applicationimplements · Partial application is the creation of a function by fixing some arguments of another function, leaving the remaining arguments to be supplied later.
- higher-order functionuses · A higher-order function is a function that accepts functions as arguments, returns functions as results, or both.
Questions about partial
What is partial?
partial is a callable factory that returns a new function with specified arguments pre-applied to an existing function, leaving the remaining arguments variable.
Which Manning books explain partial?
Clojure: The Essential Reference and Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi.
What should I know before learning partial?
Manning books that teach partial usually introduce function first.
What is the difference between partial and fn??
partial is a callable factory that returns a new function with specified arguments pre-applied to an existing function, leaving the remaining arguments variable. fn? is a Clojure predicate that returns true when its argument is a Clojure function.
What is partial part of?
Partial is part of functools. functools is a Python standard-library module providing higher-order functions, decorators, and utilities for working with callable objects.
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.

