Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: standard-pitch , Previous: spit , Up: S , Home: Overview

Clamps Dictionary

splice

Function

(splice list &key (key #'first) (test #'eq))

Return a list of all sublists containing elements mutually satisfying the test predicate.

Arguments

list List to splice
key Function applied to each element of list before testing.
test Function to determine equality between two elements.

Examples

(splice '((0 1) (4 7) (7 2) (0 3) (4 5) (1 3)))
 ; => (((0 1) (0 3)) ((4 7) (4 5)) ((7 2)) ((1 3)))

(splice '((0 1) (4 7) (7 2) (0 3) (4 5) (1 7)) :key #'second)
 ; => (((0 1)) ((4 7) (1 7)) ((7 2)) ((0 3)) ((4 5)))

Author: Orm Finnendahl

Created: 2025-02-18 Di 12:58

Validate