Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: map-indexed , Previous: make-ref , Up: M , Home: Overview

Clamps Dictionary

map-all-pairs

Function

(map-all-pairs return-type fn list)

Execute fn on all possible pairs of two different elements of list. The pairs are given to fn in the order of appearance in the list. return-type serves the same purpose as in #'map.

Arguments

return-type A Sequence type or nil.
fn Function of two arguments called on all pairs.
list List containing all elements to which fn gets applied pairwise.

Example

(map-all-pairs 'list #'list '(1 2 3 4 5))
;; => ((1 2) (1 3) (1 4) (1 5) (2 3) (2 4) (2 5) (3 4) (3 5) (4 5))

Author: Orm Finnendahl

Created: 2025-02-18 Di 12:58

Validate