/usr/share/zenlisp/partition.l is in zenlisp 2013.11.22-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 | ; zenlisp example program
; By Nils M Holm, 2007
; See the file LICENSE for conditions of use.
; Partition a list according to some predicate:
; (partition atom '(#1 alpha #2 beta)) => '((alpha beta) (#1 #2))
(define (partition p a)
(letrec
((partition3
(lambda (a r+ r-)
(cond ((null a)
(list r+ r-))
((p (car a))
(partition3 (cdr a)
(cons (car a) r+)
r-))
(t (partition3 (cdr a)
r+
(cons (car a) r-)))))))
(partition3 (reverse a) () ())))
|