mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
* srfi-1.scm (filter, filter!): Removed. (Now implemented in the core.)
* goops/util.scm (filter): Removed. (Now supplied by core.) * list.c, list.h (scm_filter, scm_filter_x): New functions. * debugger/command-loop.scm: Prefix all commands imported from (ice-9 debugger command-loop) with debugger:. * boot-9.scm (resolve-interface): Process #:hide; Name custom interfaces appropriately. (module-use!, module-use-interfaces!): Remove existing interfaces on the use-list based on module name rather than interface identity so that custom interfaces truly replaces their previous version.
This commit is contained in:
parent
b0dff01890
commit
c614a00b8c
10 changed files with 143 additions and 62 deletions
|
@ -174,10 +174,10 @@
|
|||
filter-map
|
||||
|
||||
;;; Filtering & partitioning
|
||||
filter
|
||||
;; filter <= in the core
|
||||
partition
|
||||
remove
|
||||
filter!
|
||||
;; filter! <= in the core
|
||||
partition!
|
||||
remove!
|
||||
|
||||
|
@ -687,18 +687,6 @@
|
|||
|
||||
;;; Filtering & partitioning
|
||||
|
||||
(define (filter pred list)
|
||||
(check-arg-type list? list "filter") ; reject circular lists.
|
||||
(letrec ((filiter (lambda (pred rest result)
|
||||
(if (null? rest)
|
||||
(reverse! result)
|
||||
(filiter pred (cdr rest)
|
||||
(cond ((pred (car rest))
|
||||
(cons (car rest) result))
|
||||
(else
|
||||
result)))))))
|
||||
(filiter pred list '())))
|
||||
|
||||
(define (partition pred list)
|
||||
(if (null? list)
|
||||
(values '() '())
|
||||
|
@ -711,9 +699,6 @@
|
|||
(define (remove pred list)
|
||||
(filter (lambda (x) (not (pred x))) list))
|
||||
|
||||
(define (filter! pred list)
|
||||
(filter pred list)) ; XXX:optimize
|
||||
|
||||
(define (partition! pred list)
|
||||
(partition pred list)) ; XXX:optimize
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue