mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-18 21:29:18 +02:00
No need to repeat member/assoc here
This commit is contained in:
parent
93b855b22c
commit
970c10d177
1 changed files with 7 additions and 7 deletions
14
srfi/1.scm
14
srfi/1.scm
|
@ -1222,10 +1222,10 @@
|
|||
(filter! (lambda (y) (not (= x y))) lis)))
|
||||
|
||||
;;; Extended from R4RS to take an optional comparison argument.
|
||||
(define (member x lis . maybe-=)
|
||||
(let ((= (:optional maybe-= equal?)))
|
||||
(find-tail (lambda (y) (= x y)) lis)))
|
||||
|
||||
;;(define (member x lis . maybe-=)
|
||||
;; (let ((= (:optional maybe-= equal?)))
|
||||
;; (find-tail (lambda (y) (= x y)) lis)))
|
||||
;;
|
||||
;;; R4RS, hence we don't bother to define.
|
||||
;;; The MEMBER and then FIND-TAIL call should definitely
|
||||
;;; be inlined for MEMQ & MEMV.
|
||||
|
@ -1267,9 +1267,9 @@
|
|||
;;;;;;;;;;;;;;;
|
||||
|
||||
;;; Extended from R4RS to take an optional comparison argument.
|
||||
(define (assoc x lis . maybe-=)
|
||||
(let ((= (:optional maybe-= equal?)))
|
||||
(find (lambda (entry) (= x (car entry))) lis)))
|
||||
;;(define (assoc x lis . maybe-=)
|
||||
;; (let ((= (:optional maybe-= equal?)))
|
||||
;; (find (lambda (entry) (= x (car entry))) lis)))
|
||||
|
||||
(define (alist-cons key datum alist) (cons (cons key datum) alist))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue