]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4985: Avoid a few trivial lambda function wrappers
authorDavid Kastrup <dak@gnu.org>
Wed, 19 Oct 2016 20:50:40 +0000 (22:50 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 28 Oct 2016 09:46:04 +0000 (11:46 +0200)
Documentation/snippets/transposing-pitches-with-minimum-accidentals-smart-transpose.ly
ly/articulate.ly
ly/music-functions-init.ly
scm/chord-name.scm
scm/define-markup-commands.scm
scm/define-music-display-methods.scm
scm/documentation-lib.scm
scm/modal-transforms.scm
scm/music-functions.scm
scm/stencil.scm

index 51ebe920786cf5486cf2f9cfc63548067bbd223a..df6ce9d6c098260ec418a76c1ce22337da923153 100644 (file)
@@ -62,7 +62,7 @@ In this manner, the most natural enharmonic notes are chosen.
      (if (pair? es)
          (ly:music-set-property!
           music 'elements
-          (map (lambda (x) (naturalize x)) es)))
+          (map naturalize es)))
      (if (ly:music? e)
          (ly:music-set-property!
           music 'element
index 0414bd926b89418e9a5d966de31fe81e2ef24b54..0f198ffbedcbdb3b6e1c7c51240f5cc718f7f787 100644 (file)
    (map (lambda (y) (ac:setduration y hemisemidur))
     (ly:music-property music 'elements))
    (set! uppernote (ly:music-deep-copy music))
-   (map (lambda (y) (ac:up y))
+   (map ac:up
     (filter
      (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
      (ly:music-property uppernote 'elements)))
           (ly:music-property abovenote 'elements))
          (map (lambda (y) (ac:setduration y gracedur))
           (ly:music-property abovenoteTwo 'elements))
-         (map (lambda (y) (ac:up y))
+         (map ac:up
           (filter
            (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
            (ly:music-property abovenote 'elements)))
-         (map (lambda (y) (ac:up y))
+         (map ac:up
           (filter
            (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
            (ly:music-property abovenoteTwo 'elements)))
           (ly:music-property gracenote 'elements))
          (map (lambda (y) (ac:setduration y gracedur))
                (ly:music-property belownote 'elements))
-         (map (lambda (y) (ac:down y))
+         (map ac:down
           (filter
            (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
            (ly:music-property belownote 'elements)))
                  (below (ly:music-deep-copy music))
                  (newmusic (make-sequential-music (list above music below music))))
            (begin
-            (map (lambda (y) (ac:down y))
+            (map ac:down
              (filter
               (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
               (ly:music-property below 'elements)))
-            (map (lambda (y) (ac:up y))
+            (map ac:up
              (filter
               (lambda (z) (eq? 'NoteEvent (ly:music-property z 'name)))
               (ly:music-property above 'elements)))
index 76c2ec64b882f079ec9fbf441076cfc30a305631..d96e655370612f6e107ac3259df3a4c066071fd1 100644 (file)
@@ -1651,9 +1651,7 @@ appropriate tweak applied.")
        (define (offset-control-points offsets)
          (if (null? offsets)
              coords
-             (map
-               (lambda (x y) (coord-translate x y))
-               coords offsets)))
+             (map coord-translate coords offsets)))
 
        (define (helper sibs offs)
          (if (pair? offs)
index 52ae72b2cb6298cfc445529d7fa1770d5e95c631..29ec16fc805d24ccc0cb8b57245f9d5df19eb7c5 100644 (file)
@@ -169,4 +169,4 @@ FOOBAR-MARKUP) if OMIT-ROOT is given and non-false.
 
   (let* ((elts (filter is-event-chord? (ly:music-property seq 'elements)))
          (alist (map chord-to-exception-entry elts)))
-    (filter (lambda (x) (cdr x)) alist)))
+    (filter cdr alist)))
index bf9b9b4dd428ef1dd1fc7590e1ff92aa239b3cd7..9ed4f9cc8301824433a9d39b7be0c59257c490cf 100644 (file)
@@ -383,7 +383,7 @@ Its appearance may be customized by overrides for @code{thickness},
     ;; The final stencil: lined-up bows
     (apply ly:stencil-add
       (map
-        (lambda (stil pt) (ly:stencil-translate stil pt))
+        ly:stencil-translate
         (circular-list init-bow-up init-bow-down)
         list-of-starts))))
 
index 42637cd16c0c5548b44395186893e0d96cdedd05..a5ccd9284928289f37284e44b63b870280973c39 100644 (file)
@@ -628,7 +628,7 @@ Otherwise, return #f."
                       (format #f "~s" string)
                       string))
                 (markup->lily-string text)))
-          (map-in-order (lambda (m) (music->lily-string m))
+          (map-in-order music->lily-string
                         (ly:music-property lyric 'articulations))))
 
 (define-display-method BreathingEvent (event)
index d5f451732615b469e518faf6659ba833ed9744f1..685dc500d32354a34db708a03761af48b8c022b8 100644 (file)
@@ -51,8 +51,7 @@
     "\n\n"
     (if (pair? (node-children node))
         (texi-menu
-         (map (lambda (x) (menu-entry x))
-              (node-children node)))
+         (map menu-entry (node-children node)))
         ""))
    port)
   (for-each (lambda (x) (dump-node x port (+ 1 level)))
index f9e26ed360235d316a5a467fab1c9d19483d3f3f..70c813e8e68d6721d53eb2ab7f125f9a22405c86 100644 (file)
@@ -142,9 +142,7 @@ Typically used to construct a scale for input to
       (list pitch))
 
      ((pair? elements)
-      (append-map
-       (lambda (x) (make-scale x))
-       elements))
+      (append-map make-scale elements))
 
      ((ly:music? element)
       (make-scale element)))))
index dd919624624439e400efe5f67e3e00f91e162743..3e9818d0093b48c1d0072dbfe3d7fa2d97efcf18 100644 (file)
@@ -2313,9 +2313,7 @@ list or if there is a type-mismatch, @var{arg} will be returned."
               (number-pair? offsets)))
      (coord-translate arg offsets))
     ((and (number-pair-list? arg) (number-pair-list? offsets))
-     (map
-       (lambda (x y) (coord-translate x y))
-       arg offsets))
+     (map coord-translate arg offsets))
     (else arg)))
 
 (define-public (grob-transformer property func)
index 17f5f9084f69c9364e39d703de9dc17b182d848e..433bf634d8c21961814c74961612d8088e6a2ccb 100644 (file)
@@ -1130,7 +1130,7 @@ grestore
          ((eq? head 'rotate-stencil) (interpret (caddr expr)))
          ((eq? head 'translate-stencil) (interpret (caddr expr)))
          ((eq? head 'combine-stencil)
-          (for-each (lambda (e) (interpret e))  (cdr expr)))
+          (for-each interpret  (cdr expr)))
          (else
           (collect (fold-false-pairs (strip-floats expr))))