[Top][All Lists]

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

Re: new function

From: Matt Wette
Subject: Re: new function
Date: Sun, 19 Sep 2021 07:41:04 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 9/19/21 12:54 AM, Damien Mattei wrote:
i'm developing an extension to Scheme
and i need a procedure or macro that define a variable only if it is not bind and if it is just set! it.

I can not do it in Guile or any Scheme,and i'm desperately searching a way to do that. I finally conclude that it can be done only by adding it in the language.

Can someone include a such function in Guile next release?
i know guile have a predicate defined? to test binfing of a vairable but writing a macro with it is not possible because define can be used in an expression context.

Thank in advance for any help

Check the manual.

scheme@(guile-user)> (define-once a 1)
scheme@(guile-user)> (define-once a 2)
scheme@(guile-user)> a
$1 = 1

reply via email to

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