Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: path-find-file , Previous: P , Up: P , Home: Overview

Clamps Dictionary

partition-seq

Function

(partition-seq seq pred)

Partition seq into sublists based on a predicate called on successive elements. pred is a function of two args, an element of the seq and its successor. If pred returns non-nil, a new subseq is started after the current element. The result contains all elements of the original seq in orginal order.

Example

(partition-seq '(1 2 4 5 6 8 9) #'(lambda (x y) (> (- y x) 1))) 
;; => ((1 2) (4 5 6) (8 9))

(partition-seq '(1 2 4 5 6 8 9) #'(lambda (x y) t)) 
;; => ((1) (2) (4) (5) (6) (8) (9))

Author: Orm Finnendahl

Created: 2025-06-08 So 16:56

Validate