Ignore:
Timestamp:
03/03/10 21:05:41 (11 years ago)
Author:
astalla
Message:

Support for user-extensible sequences, adapted from SBCL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/fill.lisp

    r11391 r12516  
    3232(in-package "SYSTEM")
    3333
     34(require "EXTENSIBLE-SEQUENCES-BASE")
     35
    3436;;; Adapted from CMUCL.
    3537
     
    4951
    5052(defun fill (sequence item &key (start 0) end)
    51   (cond ((listp sequence)
    52          (list-fill sequence item start end))
    53         ((and (stringp sequence)
    54               (zerop start)
    55               (null end))
    56          (simple-string-fill sequence item))
    57         (t
    58          (vector-fill sequence item start end))))
     53  "Replace the specified elements of SEQUENCE with ITEM."
     54  (sequence::seq-dispatch sequence
     55    (list-fill sequence item start end)
     56    (cond ((and (stringp sequence)
     57    (zerop start)
     58    (null end))
     59     (simple-string-fill sequence item))
     60    (t
     61     (vector-fill sequence item start end)))
     62    (sequence:fill sequence item
     63       :start start
     64       :end (sequence::%check-generic-sequence-bounds
     65       sequence start end))))
Note: See TracChangeset for help on using the changeset viewer.