Also replaced some uses of zip with multi-list map.
(sig-type-names (map type-name sig))
(signature-str
(string-join
- (map (lambda (x) (string-append
- "@var{" (car x) "} (" (cadr x) ")" ))
- (zip arg-names sig-type-names))
+ (map (lambda (x y) (string-append
+ "@var{" x "} (" y ")" ))
+ arg-names sig-type-names)
" " )))
(string-append
;; x)
(define-public (stderr string . rest)
- (apply format (cons (current-error-port) (cons string rest)))
+ (apply format (current-error-port) string rest)
(force-output (current-error-port)))
(define-public (debugf string . rest)
(if #f
- (apply stderr (cons string rest))))
+ (apply stderr string rest)))
(define (index-cell cell dir)
(if (equal? dir 1)
(define-public (ergonomic-simple-format dest . rest)
"Like ice-9's @code{format}, but without the memory consumption."
(if (string? dest)
- (apply simple-format (cons #f (cons dest rest)))
- (apply simple-format (cons dest rest))))
+ (apply simple-format #f dest rest)
+ (apply simple-format dest rest)))
(define format
ergonomic-simple-format)
v)
(define-public (print . args)
- (apply format (cons (current-output-port) args)))
+ (apply format (current-output-port) args))
;;; General settings.
(define (dump-profile base last this)
(let* ((outname (format #f "~a.profile" (dir-basename base ".ly")))
- (diff (map (lambda (y) (apply - y)) (zip this last))))
+ (diff (map - this last)))
(ly:progress "\nWriting timing to ~a..." outname)
(format (open-file outname "w")
"time: ~a\ncells: ~a\n"
(string-append "<!-- " s " -->\n"))
(define-public (entity entity string . attributes-alist)
- (if (equal? string "")
+ (if (string-null? string)
(apply eoc entity attributes-alist)
(string-append
- (apply eo (cons entity attributes-alist)) string (ec entity))))
+ (apply eo entity attributes-alist) string (ec entity))))
(define (offset->point o)
(ly:format "~4f ~4f" (car o) (- (cdr o))))
(define (page-translate-systems page)
(for-each
- (lambda (sys-off)
- (let*
- ((sys (car sys-off))
- (off (cadr sys-off)))
+ (lambda (sys off)
+ (if (not (number? (ly:prob-property sys 'Y-offset)))
+ (ly:prob-set-property! sys 'Y-offset off)))
- (if (not (number? (ly:prob-property sys 'Y-offset)))
- (ly:prob-set-property! sys 'Y-offset off))))
-
- (zip (page-property page 'lines)
- (page-property page 'configuration))))
+ (page-property page 'lines)
+ (page-property page 'configuration)))
(define (annotate-top-space first-system layout header-stencil stencil)
(let* ((top-margin (ly:output-def-lookup layout 'top-margin))