"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "TeXmacs/progs/kernel/library/list.scm" between
TeXmacs-1.99.4-src.tar.gz and TeXmacs-1.99.5-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

list.scm  (TeXmacs-1.99.4-src):list.scm  (TeXmacs-1.99.5-src)
skipping to change at line 287 skipping to change at line 287
(define-public (list->assoc l) (define-public (list->assoc l)
"Group entries of list @l two by two and construct association list" "Group entries of list @l two by two and construct association list"
(if (or (null? l) (null? (cdr l))) (list) (if (or (null? l) (null? (cdr l))) (list)
(cons (cons (car l) (cadr l)) (list->assoc (cddr l))))) (cons (cons (car l) (cadr l)) (list->assoc (cddr l)))))
(define-public (assoc->list l) (define-public (assoc->list l)
"intersperse all keys and values in @l into a flat list" "intersperse all keys and values in @l into a flat list"
(append-map (lambda (x) (list (car x) (cdr x))) l)) (append-map (lambda (x) (list (car x) (cdr x))) l))
(define-public (forall? pred? l)
(cond ((null? l) #t)
((not (pred? (car l))) #f)
(else (forall? pred? (cdr l)))))
(define-public (exists? pred? l)
(cond ((null? l) #f)
((pred? (car l)) #t)
(else (exists? pred? (cdr l)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Search and replace ;; Search and replace
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (list-find l pred?) (define-public (list-find l pred?)
"Applies @pred? on elements of @l until it evaluates to true." "Applies @pred? on elements of @l until it evaluates to true."
(let next ((l l)) (let next ((l l))
(if (null? l) #f (if (null? l) #f
(if (pred? (car l)) (if (pred? (car l))
(car l) (car l)
 End of changes. 1 change blocks. 
0 lines changed or deleted 10 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS