|
From: | Aaron Hill |
Subject: | Re: Define variable only if it doesn't exist / is unbound |
Date: | Thu, 28 Mar 2019 14:21:59 -0700 |
User-agent: | Roundcube Webmail/1.3.8 |
On 2019-03-28 2:18 pm, Valentin Villenave wrote:
On 3/28/19, Pedro Pessoa <address@hidden> wrote:I imagined something like: %%% pseudo #(define var (not (is-bound? var) 0)) %%%I’d probably probably do something like (null? (ly:parser-lookup 'var)) But I’m sure there are better ways :-)
;;;; (if (not (defined? 'foo)) (define foo 47)) ;;;; -- Aaron Hill
[Prev in Thread] | Current Thread | [Next in Thread] |