Thomas Morley <thomasmorle...@googlemail.com> writes: > Well, I managed to order the list with some scheme-code: > > %%%%%%%%%%%%%%%%%%%%%%%%%% > > #(define l '((f . 4)(g . 4)(d . 3)(e . 3)(c . 2) (a . 1) (b . 1))) > > #(define (split-at-equal-cdr alist) > "After `split-at-predicate´ from lily-library.scm > BTW, why is it not public? > " > (if (null? alist) > (list alist) > (let ((i (list-index > (lambda (x y) (not (= (cdr x) (cdr y)))) > alist > (cdr alist)))) > (if i > (cons (take alist (1+ i)) (drop alist (1+ i))) > (list alist))))) > > #(define (order-alist l) > (define (helper l1 l2) > (if (null? l1) > l2 > (helper > (cdr (split-at-equal-cdr l1)) > (append (car (split-at-equal-cdr l1)) l2)))) > (helper l '())) > > #(write (order-alist l)) > > %%%%%%%%%%%%%%%%%%%%%%%%%% > > Returns: ((a . 1) (b . 1) (c . 2) (d . 3) (e . 3) (f . 4) (g . 4)) > and would be ok.
Eyes glaze over. Wouldn't (sort-list l (lambda (a b) (< (cdr a) (cdr b)))) work here? > Is there any reason for the default-behaviour of 'label-page-table? No idea. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel