On Tue, Nov 12, 2019 at 1:45 AM Eric Abrahamsen <
address@hidden> wrote:
> Do I need to use a struct with one slot? Any other tips?
You could do something like:
(setq my-list '(gnus-range (1 . 9) 35 120))
(cl-defgeneric seq-length ((sequence (head gnus-range)))
(let ((l 0))
(dolist (elt (cdr sequence))
(cl-incf l (if (consp elt) (1+ (- (cdr elt) (car elt))) 1)))
l))
(seq-length my-list)