y
(loop (cdr x) (if (memq (car x) y) y (cons (car x) y)))))))
-(define (differenceq x y)
- (if (null? y)
- x
- (let loop ((x x) (z '()))
- (if (null? x)
- (reverse! z)
- (loop (cdr x) (if (memq (car x) y) z (cons (car x) z)))))))
-
-(define (subsetq? x y)
- (or (null? x)
- (and (memq (car x) y)
- (subsetq? (cdr x) y))))
-
(define (remove-duplicates items)
(let loop ((items items) (result '()))
(if (null? items)
(loop (cdr items)
(if (memq (car items) result)
result
- (cons (car items) result))))))
-
-(define (hash-table/modify! table key default modifier)
- (hash-table/put! table key (modifier (hash-table/get table key default))))
-
-(define (map! procedure items)
- (do ((items items (cdr items)))
- ((null? items))
- (set-car! items (procedure (car items))))
- items)
\ No newline at end of file
+ (cons (car items) result))))))
\ No newline at end of file