package.lisp - clic - Clic is an command line interactive client for gopher written in Common LISP
(HTM) git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/clic/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
(DIR) LICENSE
---
package.lisp (1382B)
---
1 ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; SPLIT-SEQUENCE
4 ;;;
5 ;;; This code was based on Arthur Lemmens' in
6 ;;; <URL:http://groups.google.com/groups?as_umsgid=39F36F1A.B8F19D20%40simplex.nl>;
7 ;;;
8 ;;; changes include:
9 ;;;
10 ;;; * altering the behaviour of the :from-end keyword argument to
11 ;;; return the subsequences in original order, for consistency with
12 ;;; CL:REMOVE, CL:SUBSTITUTE et al. (:from-end being non-NIL only
13 ;;; affects the answer if :count is less than the number of
14 ;;; subsequences, by analogy with the above-referenced functions).
15 ;;;
16 ;;; * changing the :maximum keyword argument to :count, by analogy
17 ;;; with CL:REMOVE, CL:SUBSTITUTE, and so on.
18 ;;;
19 ;;; * naming the function SPLIT-SEQUENCE rather than PARTITION rather
20 ;;; than SPLIT.
21 ;;;
22 ;;; * adding SPLIT-SEQUENCE-IF and SPLIT-SEQUENCE-IF-NOT.
23 ;;;
24 ;;; * The second return value is now an index rather than a copy of a
25 ;;; portion of the sequence; this index is the `right' one to feed to
26 ;;; CL:SUBSEQ for continued processing.
27
28 ;;; There's a certain amount of code duplication in the vector and
29 ;;; extended sequence modules, which is kept to illustrate the
30 ;;; relationship between the SPLIT-SEQUENCE functions and the
31 ;;; CL:POSITION functions.
32
33 (defpackage #:split-sequence
34 (:use #:common-lisp)
35 (:export #:split-sequence
36 #:split-sequence-if
37 #:split-sequence-if-not))