lilypond-user
[Top][All Lists]
Advanced

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

Re: cheap-list


From: Aaron Hill
Subject: Re: cheap-list
Date: Wed, 06 May 2020 19:59:10 -0700
User-agent: Roundcube Webmail/1.4.2

On 2020-05-06 7:34 pm, Freeman Gilmore wrote:
What is a  cheap-list  and where is it explained?
Thank you, ƒg

There is no such thing as a "cheap list" per se. cheap-list? is simply a faster predicate compared to the standard list?:

;;;; from c++.scm
(define-public (cheap-list? x)
  (or (pair? x) (null? x)))
;;;;

All lists will pass cheap-list?, but not all things that pass cheap-list? are lists. Additional care must be taken within the function body when using cheap-list? as a type predicate.


-- Aaron Hill



reply via email to

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