Lukas-Fabian Moser <l...@gmx.de> writes: >> >> > \version "2.19.44" >> > >> > #(define (nth n l) >> > (if (or (> n (length l)) (< n 0)) >> > (error "Index out of bounds.") >> > (if (eq? n 0) >> > (car l) >> > (nth (- n 1) (cdr l))))) >> >> Seriously? >> >> #(define (nth n l) (list-ref l n)) >> > > Of course not - being absolutely foreign to scheme, I searched the web > for a solution of the problem "get n-th element of list",
There is your mistake. The first place to search should be the Guile manual. The second place the pertinent Scheme standard (incidentally being delivered as part of Guile, too). The "web" is organized by page rank, resulting in the blind leading the clueless. The Guile manual might not be consistently great, but it tends to beat a random search. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user