From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.devel Subject: Re: new function Date: Sun, 19 Sep 2021 07:41:04 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="562"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Sep 19 16:41:25 2021 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRy0S-000AWU-UY for guile-devel@m.gmane-mx.org; Sun, 19 Sep 2021 16:41:24 +0200 Original-Received: from localhost ([::1]:40204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRy0R-0004Uw-3N for guile-devel@m.gmane-mx.org; Sun, 19 Sep 2021 10:41:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRy0G-0004TC-GV for guile-devel@gnu.org; Sun, 19 Sep 2021 10:41:12 -0400 Original-Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:35606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRy0C-00057A-RL for guile-devel@gnu.org; Sun, 19 Sep 2021 10:41:11 -0400 Original-Received: by mail-pf1-x432.google.com with SMTP id w14so3300100pfu.2 for ; Sun, 19 Sep 2021 07:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=CcNMEamZme9bL5p1DxBfa+S5Qdbf8GQVaJHreANx5v0=; b=pdnP1+izZo7DI25zSkGjr+4E2WlGjVRJ3j8JyS45uJeJs6GrvL2PXU6JOS8Wobq20f 2hcckC7tSm+3p7y9iUWm2RVSG5gK9C3jWPx4vR073Zm/WVtifkN9F9mihU2/7oF54n0s 9SnqIm/MYi0IOoZE9Cg0EBbCkUlrv55qK2AYgT7AQ5O6MyWMRsRTZmCbEU6lYfoVug2g ipFbJj/RcBcVh2CT6Sf6dQiXNYuU8uUvPUMq79RIEuucdt9H1wDch7A1IvC3g153mfMo H+Z0clVf3pahXiygIrbTW/xscnpz3PemMUxfkhIxa7i7Ijg8k8P8Bam9m1VJeOf1axZ6 RS7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=CcNMEamZme9bL5p1DxBfa+S5Qdbf8GQVaJHreANx5v0=; b=eY0lAKy7JVAxBd5Uo0pk1QXHNTSB1bGnfkzMZxAfpgvkAygzcnbMaAiayMVoF6WjIA I7/W95oqm9LEVHriixJAjoYkjObk5926UF+0Kq56U6rhldTUzyfmbhVjYPEiFbsWAAY3 m9G6tr5Yf0m5qgs8bqsTHJCPmYpJwyu0A8mOPOLirM4WC3aKaNzPrUc0AYj4lNPKm1h5 3bpu6UDm866/bM4juBE1QUSJsXrchFZUhy2E8YGGXoLO2zv/bo4/w/bL9gW5JfBI+qEd KQUevrDq5qNeRTvlljy6scLtHEFx9+3Lj7lDEv94/8yuJDKv20vkcl66VZgKyYKJUJ2/ ENJA== X-Gm-Message-State: AOAM532TS0kL4EgU92vkqdI/IC0uVbeeF7y7eGo6giQJ5kvxaWRbayz1 tz3XD9UexgCcUqswqLEKASxdfd+UkC8= X-Google-Smtp-Source: ABdhPJwxvfgq3xR8RnSHKLbiti5+6xaNP0vzcEZfpKyI3//RjmqGGwW001o0r8GachEYoy/SQc+zjQ== X-Received: by 2002:a62:16cd:0:b0:440:5296:afab with SMTP id 196-20020a6216cd000000b004405296afabmr19499075pfw.4.1632062466243; Sun, 19 Sep 2021 07:41:06 -0700 (PDT) Original-Received: from [192.168.2.163] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id p4sm12296267pgc.15.2021.09.19.07.41.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Sep 2021 07:41:05 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=matt.wette@gmail.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20864 Archived-At: On 9/19/21 12:54 AM, Damien Mattei wrote: > hello, > 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 > Damien Check the manual. scheme@(guile-user)> (define-once a 1) scheme@(guile-user)> (define-once a 2) scheme@(guile-user)> a $1 = 1 scheme@(guile-user)>