partial creates a function with leading arguments pre-applied, deferring invocation until additional arguments arrive. It suits higher-order uses where configuration is available before the remaining data. section 2.2.8
Its contract is simple but positional:
- Accepts a target function and zero or more captured arguments; the target normally has at least one argument. section 2.2.8
- Returns a variable-arity function that appends later arguments before calling the target. section 2.2.8
- Captures only from the left, leaving missing arguments at the end; excess arguments can produce an ArityException. section 2.2.8
Configure a reusable function
(def incrementer (partial + 1)) (incrementer 1 1) ;; 3 (map (partial validate #{:id :cache :product}) requests) ;; (true false) Use fn when arguments must be supplied in arbitrary positions; partial is clearer when an existing function receives fixed leading configuration. section 2.2.8

