> [...] why not define a function that takes a function and a list of
> pairs? It's usual to have procedure arguments:
> 
> (define (map-on-pairs fn pairs)
>   (cons (apply fn (map car pairs))
>         (apply fn (map cdr pairs))))
> 
> (map-on-pairs + '((1 . 1) (2 . 3) (5 . 8))) => (8 . 12)
> (map-on-pairs min '((1 . 8) (1 . 5) (2 . 3))) ==> (1 . 3)

Very nice!


    Werner


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to