From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Abou Samra Newsgroups: gmane.lisp.guile.user Subject: Macro to prepend element to list Date: Sat, 20 Mar 2021 15:24:30 +0100 Message-ID: <7e1286e7-3135-7747-9e25-395ffab3362e@abou-samra.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30587"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Mar 20 15:47:33 2021 Return-path: Envelope-to: guile-user@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 1lNct2-0007q6-Mj for guile-user@m.gmane-mx.org; Sat, 20 Mar 2021 15:47:32 +0100 Original-Received: from localhost ([::1]:45414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNct1-00050q-P8 for guile-user@m.gmane-mx.org; Sat, 20 Mar 2021 10:47:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNcWp-0002te-VC for guile-user@gnu.org; Sat, 20 Mar 2021 10:24:35 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.133]:60987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNcWo-0005SZ-91 for guile-user@gnu.org; Sat, 20 Mar 2021 10:24:35 -0400 Original-Received: from [192.168.1.20] ([82.65.251.18]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.168]) with ESMTPSA (Nemesis) id 1M6lxe-1lJnJe0JBe-008JHS for ; Sat, 20 Mar 2021 15:24:32 +0100 Content-Language: en-US X-Provags-ID: V03:K1:XlF3BnLjMGBlcd/8fvA3UDDwhW/mOE8NHErqhie98fQDz9aGB/k ppMgXQUvZNkauGF/P/6tQNV5/jqR2domP3cm7mNIMwtUHc58di0SY78Jo2aIEHEJJL5JicT vawZGdao8VsWrZ8BlfkaTsRJrCRLTYjABQJgcTGCejsHlARL8zxXvZ1+9I3ZsVw+4mwh1US wX7qzZysBo3OM6uH9ENvQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:8MEz5uFK3k0=:G1yrkNkGU0Bqg8M/RpAKtQ 5v9mtsSMLZxhsdt1KywI/EIf/3Q1Y2N1OTOAEVsn7wOwPFc46R0G1f2bMbk+YkQuDIMfMyWKu GSgjPO381O6icx1UaOB+axNvJvQCXCRZRqmuAVz5W0feFXSPki8IP0wMYEY8ZNBx8Xtsr8wGD UBHATHVnWdVNbzPgTnmLOPvl/tV4MpiNhAVkkpDrisYWUkjhXviDcvhLYeCbedgCYhIR2FkNG 2hLdoycioCqAGYzqd0Cyrz6p+6pGSLoEQIRCr7iarutGrHjkoDt4KK1uJ6mMf84sYhBd4TEul dFPkzFjXOjMamWq9XjCbh4A5QN72lArXi6016QIRH0UfgyNICfXbuQCT74wNNv5dWpqcM/klr XlCF8ct2VcyNW5rXouR4Gmu1mMN5qM+DdHfO3sX7XQ60Gbx/qOTfdDiylnr3ixkxquemEvimF wx8vicM74g== Received-SPF: none client-ip=212.227.126.133; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 20 Mar 2021 10:47:20 -0400 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17369 Archived-At: Hello, I find myself frequently using the following macro: (define-macro (prepend! thing lst)    `(set! ,lst (cons ,thing ,lst))) Have I missed a module somewhere that does this kind of things? At least, I couldn't find anything in SRFIs. It may also be the case that this is too specific to certain non-functional usages (LilyPond in my case). Thanks in advance, Jean Abou Samra