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/search.lisp

    r11391 r12516  
    3131
    3232(in-package "SYSTEM")
     33
     34(require "EXTENSIBLE-SEQUENCES-BASE")
    3335
    3436;; From CMUCL.
     
    111113  ) ; eval-when
    112114
    113 (defun search (sequence1 sequence2 &key from-end (test #'eql) test-not
    114                         (start1 0) end1 (start2 0) end2 key)
     115(defun search (sequence1 sequence2 &rest args &key from-end (test #'eql)
     116         test-not (start1 0) end1 (start2 0) end2 key)
    115117  (let ((end1 (or end1 (length sequence1)))
    116118  (end2 (or end2 (length sequence2))))
    117119    (when key
    118120      (setq key (coerce-to-function key)))
    119     (if (listp sequence2)
    120         (list-search sequence2 sequence1)
    121         (vector-search sequence2 sequence1))))
     121    (sequence::seq-dispatch sequence2
     122      (list-search sequence2 sequence1)
     123      (vector-search sequence2 sequence1)
     124      (apply #'sequence:search sequence1 sequence2 args))))
    122125
    123126(defun simple-search (sequence1 sequence2)
Note: See TracChangeset for help on using the changeset viewer.