/usr/lib/s9fes/set-difference.scm is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ; Scheme 9 from Empty Space, Function Library
; By Nils M Holm, 2010
; See the LICENSE file of the S9fES package for terms of use
;
; (set-difference list ...) ==> list
;
; Compute the difference of a number of sets.
;
; Example: (set-difference '(a b c d e f) '(b d) '(a f)) ==> (c e)
(define (set-difference . a*)
(letrec
((set-difference-3 (lambda (a b r)
(cond ((null? a)
(reverse! r))
((member (car a) b)
(set-difference-3 (cdr a) b r))
(else
(set-difference-3 (cdr a) b (cons (car a) r)))))))
(if (null? a*)
a*
(fold-left (lambda (a b)
(set-difference-3 a b '()))
(car a*)
(cdr a*)))))
|