Thank you Harm and Aaron! I tested your solutions;they both work and I think there are pretty clear!! But I think, next days I will try to explain what I'm doing.
Thanks a lot!!! g. On Sat, 6 Apr 2019 at 19:09, Aaron Hill <lilyp...@hillvisions.com> wrote: > On 2019-04-06 9:50 am, Thomas Morley wrote: > > Though, I'd think you should rethink whatever you plan, I'm very > > skeptic about always resetting a toplevel defined list. > > It's too destructive. > > Also, it is convention to use an exclamation point as a suffix when > naming procedures that may modify the structure of arguments to produce > their results. This makes it easier for users to know where side > effects might exist. > > Consider this: > > %%%% > #(define (1+last! lst) (list-set! lst (- (length lst) 1) (1+ (last > lst)))) > > #(define foo '(1 2 3)) > #(1+last! foo) > #(format #t "\nfoo = ~a" foo) > #(1+last! foo) > #(format #t "\nfoo = ~a" foo) > %%%% > > > -- Aaron Hill > > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user >
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user