From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Easy to add with push but not to the end of a list Date: Wed, 30 Nov 2022 18:10:22 +0100 Message-ID: <877czcid1d.fsf@web.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21816"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 30 18:11:04 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1p0Qbw-0005PE-CA for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 30 Nov 2022 18:11:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0QbS-0002Hx-9J; Wed, 30 Nov 2022 12:10:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0QbQ-0002EG-Gc for help-gnu-emacs@gnu.org; Wed, 30 Nov 2022 12:10:32 -0500 Original-Received: from mout.web.de ([212.227.15.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0QbO-0006eg-Q4 for help-gnu-emacs@gnu.org; Wed, 30 Nov 2022 12:10:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1669828223; bh=tiXsXgWjJtu5xzeP060nchDTvhcPOIe0n3pgqduom3A=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=uEOA6Vg8FM0A/klWi7Tyrc5Ua6XWqbJAujYW3HCS0yvhmv1NLUHfOhW9U0rl5Aj2P Vk34VNvjw4GXo051cr3Eu1Awr/UJZLadRB1OE8Pt8t7l4JPylht2y1+Qf7jRLi34aj KOfM/lRyqOiq1ygByzuKh2bFN4oXZc9NKUNFb3ONAK5pYwUPPm7m0oYh/yQByisgCm 62QEBVcffXFGVbmVreco+cNdmf5IXi1fegTS5olP1c31zpjRLpSrney1sOjpuft8ef c2/uJAQWEe3KOAXkf+rIHQUfng8/vnH5c80WdKKGNM1ZUnHbc1/G0GqhJ15mjJJOg5 psg8fUzAvkHxg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([92.76.229.140]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MzCA3-1omLr21BRb-00wEwr; Wed, 30 Nov 2022 18:10:23 +0100 In-Reply-To: (Heime's message of "Mon, 28 Nov 2022 02:26:20 +0000") X-Provags-ID: V03:K1:dZidgbQp/ZlwMS+aFEghxQxJEJavODFcmMbJ8BjUQqIXs0CjcD5 du4AkMcAoblBJ5XxgNVwbLdfS1UeguNHS6hL9S9uTtCpJjjnSXAVz9Z39wcIU+oHf/NQ2kg iQDIH67VejdFT2tXCe5f2nDB92MHs6b4HeYGBEGBtfiuTcv7V7ERE9ncf6el7bMmd0YkyhB 4nd2uy5LHZTcGKUrZdniQ== UI-OutboundReport: notjunk:1;M01:P0:yrPVaR/3bWk=;RXPq7fpxoJPIbT+g8dmEz8lARfP BlyHNrrcKCV9MhFT6+6XGCxO3gQGuORPMlSOtYsY+ImvBTcrpYjgv04TPu9Ykbay1vTG5nrDK WqTOuMI0tE9SHuwvOVggere8ibpt6lB3qYLdVrtmMMqS8et2tvIqBJR0AbnKzPijviO1dnxIX pmqWfdBNjo4TE3EUSWKh/8NlUGmtwmbiDyojNbwXidksFYiHOtd3vd8imemoMxqHQylRl1Lxa 52kUndXwVXI+dWzs/R6HOXWDx8ooCL17n/VsfohG+wYrsaKc2PwuCgKfoVLhgX+4fT5ZcU57C juegnQ8eBJGViuh2FhPzNpUKz3uaXyXC/zXgcTx7LVJfaxjBGHuSOYi2nN+AoOW8hIjsORnNj YC8sA5umJx2HSz1dnSPltyWoBSqKSKvkqIh7SGFzs6/PWhaZil1GHC718R+BzTKD6OsULvhwS HBM0UJQFFylkO4L1jFUjBUvAlyhP660CA61PghcKEq5o8zXKSS2emb/0v5G+sfGI1sEYZiGOu OyRuS4opVlIXLKJXY2UQRQ3yILOl7FqHBo1vvZXZqPMjhInafzihPHg+PS5z8ilIkRo7+7ZqV P41ba/E0xw6cizSt9maSmrJSnWekd5nl+7cPE940zLp2YLzVS0O0Pgjt11N6ETKFoR+/u2hmA We7wmzlsQ/04zJ7Q33vIKThT4MmYg8bZ/W+egbHiKmcTK4OukKn0Ycjw6iwBXP2l7qcLmkbmk HkG4NefSbExEcZcl7DKbbSv7HcCrC3cDdlCNZNBHJqrWHKqUNaJOq98TAt/QwEwJVL2dcCNo Received-SPF: pass client-ip=212.227.15.14; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141277 Archived-At: Heime writes: > Although it is easy to add to a list using push, it currently looks > hideous to be able to add to the end of a list. In addition to what has already been said: if you store and update the last cdr of your list (in a variable for example), you can add something to the end of the list in O(1). The cost is the cost of maintaining additional data. Michael.