seq.el (1816B)
1 ;;; seq.el --- Sequence manipulation functions -*- lexical-binding: t -*- 2 3 ;; Copyright (C) 2014-2023 Free Software Foundation, Inc. 4 5 ;; Author: Nicolas Petton <nicolas@petton.fr> 6 ;; Keywords: sequences 7 ;; Version: 2.24 8 ;; Package: seq 9 10 ;; Maintainer: emacs-devel@gnu.org 11 12 ;; This file is part of GNU Emacs. 13 14 ;; GNU Emacs is free software: you can redistribute it and/or modify 15 ;; it under the terms of the GNU General Public License as published by 16 ;; the Free Software Foundation, either version 3 of the License, or 17 ;; (at your option) any later version. 18 19 ;; GNU Emacs is distributed in the hope that it will be useful, 20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 ;; GNU General Public License for more details. 23 24 ;; You should have received a copy of the GNU General Public License 25 ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. 26 27 ;;; Commentary: 28 29 ;; Sequence-manipulation functions that complement basic functions 30 ;; provided by subr.el. 31 ;; 32 ;; All functions are prefixed with "seq-". 33 ;; 34 ;; All provided functions work on lists, strings and vectors. 35 ;; 36 ;; Functions taking a predicate or iterating over a sequence using a 37 ;; function as argument take the function as their first argument and 38 ;; the sequence as their second argument. All other functions take 39 ;; the sequence as their first argument. 40 ;; 41 ;; seq.el can be extended to support new type of sequences. Here are 42 ;; the generic functions that must be implemented by new seq types: 43 ;; - `seq-elt' 44 ;; - `seq-length' 45 ;; - `seq-do' 46 ;; - `seqp' 47 ;; - `seq-subseq' 48 ;; - `seq-into-sequence' 49 ;; - `seq-copy' 50 ;; - `seq-into' 51 52 ;;; Code: 53 54 (if (version< emacs-version "25") 55 (require 'seq-24) 56 (require 'seq-25)) 57 58 (provide 'seq) 59 ;;; seq.el ends here