lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clean up code for sorting grob-properties. (issue 102760044)


From: dak
Subject: Re: Clean up code for sorting grob-properties. (issue 102760044)
Date: Wed, 28 May 2014 21:46:55 +0000


https://codereview.appspot.com/102760044/diff/90001/scm/document-backend.scm
File scm/document-backend.scm (right):

https://codereview.appspot.com/102760044/diff/90001/scm/document-backend.scm#newcode37
scm/document-backend.scm:37: (set! all-grob-descriptions
Doing an assoc-set! here is inefficient inside of the loop.  Instead of
(for-each
   (lambda (grob-description)
      ...
      (set! all-grob-descriptions (assoc-set! ...

one should use
(set! all-grob-descriptions
  (map!
     (lambda (grob-description)
        ;replacement for grob description)
     all-grob-descriptions))

Changing the list when doing the iteration is not well-defined anyway.

https://codereview.appspot.com/102760044/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]