Changeset 4688


Ignore:
Timestamp:
11/10/03 00:13:04 (18 years ago)
Author:
piso
Message:

Moved CONCATENATE to concatenate.lisp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/sequences.lisp

    r2720 r4688  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: sequences.lisp,v 1.52 2003-07-02 17:23:06 piso Exp $
     4;;; $Id: sequences.lisp,v 1.53 2003-11-10 00:13:04 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    5555      (list-subseq sequence start end)
    5656      (vector-subseq sequence start end)))
    57 
    58 
    59 ;;; CONCATENATE (from GCL)
    60 
    61 (defun concatenate (result-type &rest sequences)
    62   (do ((x (make-sequence result-type
    63        (apply #'+ (mapcar #'length sequences))))
    64        (s sequences (cdr s))
    65        (i 0))
    66     ((null s) x)
    67     (do ((j 0 (1+ j))
    68          (n (length (car s))))
    69       ((>= j n))
    70       (setf (elt x i) (elt (car s) j))
    71       (incf i))))
Note: See TracChangeset for help on using the changeset viewer.