[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cheap-list
From: |
Aaron Hill |
Subject: |
Re: cheap-list |
Date: |
Thu, 07 May 2020 19:37:27 -0700 |
User-agent: |
Roundcube Webmail/1.4.2 |
On 2020-05-07 6:54 pm, Freeman Gilmore wrote:
That helps but I do not know how to use it. For now that is OK I
found the places in “Notation Reference” where cheap-list was
mentioned, that is why I asked.
It would be used in place of list? as a type predicate. Consider:
%%%%
\version "2.20.0"
items =
#(define-void-function
(items) (list?)
(format #t "\nitems: ~s" items))
cheap-items =
#(define-void-function
(items) (cheap-list?)
(format #t "\ncheap-items: ~s" items))
\cheap-items #'(2 3 5)
\items #'(2 3 5)
\cheap-items #'(not a proper . list)
\items #'(not a proper . list)
%%%%
====
GNU LilyPond 2.20.0
Processing `cheap-list.ly'
Parsing...
cheap-items: (2 3 5)
items: (2 3 5)
cheap-items: (not a proper . list)
cheap-list.ly:17:8: error: wrong type for argument 1. Expecting list,
found (cons (quote not) (cons (quote a) (cons (quote proper) (quote
list))))
\items
#'(not a proper . list)
fatal error: failed files: "cheap-list.ly"
====
-- Aaron Hill