From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: [External] : Re: Easy to add with push but not to the end of a list Date: Wed, 30 Nov 2022 18:17:03 +0000 Message-ID: References: <877czcid1d.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15740"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Michael Heerdegen , Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 30 19:17:58 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 1p0Red-0003qH-Rv for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 30 Nov 2022 19:17:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0Re1-0005is-02; Wed, 30 Nov 2022 13:17:17 -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 1p0Rdu-0005iC-SG for help-gnu-emacs@gnu.org; Wed, 30 Nov 2022 13:17:13 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0Rds-0001VN-7T for help-gnu-emacs@gnu.org; Wed, 30 Nov 2022 13:17:10 -0500 Original-Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AUGwmS8005778; Wed, 30 Nov 2022 18:17:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=UUsmorc+Rb7eDlcvR6i5F70UBtWnLBzuiLuiv3Ph0p0=; b=N9sPqsVbS0WRNZ+dncqSw2w7XIspkxExcx90EvdWkIXfyg6oVzPm7WtOH1IWm3KI6e1Q k8Olhtw8ilu57Do5dDbjhCPGS4gmCkY35zz7ZRJ45sorje9ghTG696EmLhoNHlO6mKRe eG3bXtx+E8qyuAXGs8EYr2czVzhZtmkrZ2Pr161h3uO0xX+/7kkcbUSFL7VpJqTj3UL6 MI0Rf6pluBUWt4zKKwvcHtu8ptoN2/BGBTTqyLeA+N9DlMAxEoJwrtOyLqY7qk8cs+5U MjFyMWrJkJ39P3PMG9+KZ1k5SOjHQe2hZRTLICsrNzNWXeKUkARYm5tlOLpBeSVAYZf8 xg== Original-Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m397fk078-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Nov 2022 18:17:06 +0000 Original-Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AUIGZUS008840; Wed, 30 Nov 2022 18:17:05 GMT Original-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3m398fvdfb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Nov 2022 18:17:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nxxzqnAC9JVBJKiznwz98i+CfgwM4kW4iWW45CKTx7LQz0k1aHfBT5Y9AeOW9LB4cz2zkjAaCRuTm84E8fmc9lPbtZ8WsPChwpYhqoNismbAmAupbxPaDG3L8CGepVYrAgR0/jitI5ndXWaUzmtGxLaqu6jT+reDJf8J2zlAbCjbOW5DQsoW+Cn8GEOQdYrIDP730Lm2RbDDVZqgAuzv1A1MWwxiuUDly0MXmi/v43Ln06qLooIGvFnrOeRYvGXTPGPDHHoZQG0J4hpRF3dUiGpUW7kvlWMwFDODoSVs+DtOglZnPsCY/sQbjqISYNI42YhQhMcqIm1IddP5vovBvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UUsmorc+Rb7eDlcvR6i5F70UBtWnLBzuiLuiv3Ph0p0=; b=lgR45T3K/KQVOaiouLLXgdLFUdTCM/SUlsR2PIVVtDrdxZMzJLI5fzPc+biMhYl+leFxQGifq9iW14giQsHNuPfjqTuZBuCUt9kS/cJaI4+H1x9KP9jCxI4+iijaJLgmSU1RvIBRIG6lTb8mvMOWhQhuVcjCZYrcaYLrimLkMEZpuWmQ8Q8dvWn0xmfSeQ8akgZUPtsvh3pdeop7ClF1BJKIfuKXpnUjbHzVTa64HPJRzloHHFlACTp58gCfAIevlPOThYHlVgOgPJ8pvwGmnhSHIQk5lcWs/BgX3jnjgHWC8s8MRsrhKF+UJNiOL+d89v36SQT5kDinDN6tZ6F5fw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UUsmorc+Rb7eDlcvR6i5F70UBtWnLBzuiLuiv3Ph0p0=; b=t/ftRAwtNI9KoLJp7FIFxWsLETbLg+HWbihl/2d2GfUef4s44tkValyysZTXlud4+Z6CPMTaz4Hzvi+Pw4xKbBCipxvhnmHlSwkKB0NZQEUFPudYCoDuAedj+3aeJ/Hbnk5UI98/YG+15oIRpFDWs4ilsUitOSxlBaWT8Dk2WIo= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SJ2PR10MB6961.namprd10.prod.outlook.com (2603:10b6:a03:4d1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Wed, 30 Nov 2022 18:17:03 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::6951:297b:f3d5:2588]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::6951:297b:f3d5:2588%9]) with mapi id 15.20.5857.023; Wed, 30 Nov 2022 18:17:03 +0000 Thread-Topic: [External] : Re: Easy to add with push but not to the end of a list Thread-Index: AQHZBN6hShaCVKzj2UaOVpm5xecrJ65XxfdQ In-Reply-To: <877czcid1d.fsf@web.de> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|SJ2PR10MB6961:EE_ x-ms-office365-filtering-correlation-id: 4e1c7401-b37a-47b2-d3fe-08dad2ff1513 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KihiQYracGkjSiow20C9jBTLDrj7HZdPYlNDIzhOWz2Xb/nmY3rFi3zlPM9g3NpO8U8DQH7Gav9ISxj0w6B3bWkLT6n0k/lIP0S9iVJwuWHolFtTTqUSDSc+3i9/SleJ7poxSeU+2yHq35QliyO9/YKsRUL2L2zJ85TaX5pAhCmEzdYL+XaEDJzlmtR6dl6RtpT3wQHDUegHf8373M2YSrzGTugZ2Y2VNJpbg7qpN09qVZPaN6RfkSiDQJePGx4jApnY5h7EtmFN0NLRy2r7dnaABSbjqjqI4Z2bkREm+DuRTLIqmXgS7MhPX4RdZCUza/JE4+OTWgAAUtlFNI0MlN+mzmTdFkD309jrwuLV9yan3NcMfixCyizmr3v0azbZbYEdsbSiKcKHcw8D6En1d/zj7dqDW1cc8lqAfrWPewMD4ZkF20z9qjdTOQAkHd+ajut2YoHxgRUjrYfGr06bAor5xsFfL0vlUzsZdB1yHdFDN0Mp8uWQt3UzEnHgjRzjoANG98QWvWgOd+02AgSft8QqDC0v8gfRR77gjJRT3FCQwM4j1gJ4/XKSXZ3X3F7MBoe1FfIhFhTe5Yo7AYzkXES3nhDKpd5Emilge1slmDIfNhlOeZVKIk7L4f2lbQwRNng5fAFBzUEBfuQqHdpzm75DNiGYcjIlVF4Q7jYIsXhxPfDHuonLV4WJ37oJ2sX5dNoQb8uVtVMWYzb6MHQLfv0wf8wzQoQINiRPnlBWopk= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(39860400002)(366004)(376002)(346002)(136003)(451199015)(38070700005)(66946007)(316002)(41300700001)(2906002)(64756008)(66476007)(4326008)(86362001)(110136005)(66556008)(8676002)(66446008)(76116006)(33656002)(478600001)(4744005)(6506007)(5660300002)(55016003)(26005)(8936002)(71200400001)(52536014)(44832011)(9686003)(186003)(122000001)(7696005)(38100700002)(83380400001)(42463001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Q6+tkjFXG5OyaqSqOJIGypbTPqtAgwlBNxYRW1gxEZnM6uh+lacEtXPDcLTn?= =?us-ascii?Q?qHrj+clMN7XAWiFV88Tk4vMkUj1XVxkOX1AL3eTWtTj1Z4hvkua0WpnvH1po?= =?us-ascii?Q?TqC7giLeTBp2jX3+7cipRMQgRosebM2fuxgNHIXJRazmBV3VXcNhZoGXGVZD?= =?us-ascii?Q?mF8kHESuonl8yMIUAdX0U9b1O5MV3fl98DK5YENbdFigxWeNzsBY6Sq4mkMR?= =?us-ascii?Q?fVre0AiZkpmtFLXt3a+P9HPwVwbtPqiTFWmXU0Duh652AjorluipJjTC/BCq?= =?us-ascii?Q?oovOLnB069XOgY/dyXskNgqtibMfnKJ93fmJcFswWnfmYFO/W6BUpVFYfXqw?= =?us-ascii?Q?xFr95MYTW3xT/sCK87S7JdLSzJuSgJkUpHe7+rmSGV6xeHSdAKCX9d27nEcM?= =?us-ascii?Q?ih/ryg39VJ6777YohdmQ9vSC823xliIXoIxNu64OVw2fN3ITvquHI8alfbjG?= =?us-ascii?Q?7abmvBd9gCWWZjsrlXdAplbvxzjaCaIRkPBPQVBCTW0s0Y8MWQjn4Y6MkU91?= =?us-ascii?Q?qWqxqJ0T9Ch8kKCMZcxF6jiwmSvneov1jZ1l9RaL7/3ksVl4iX/KtI/hIkUM?= =?us-ascii?Q?DRWRNhjWg940MP9IVHBfjP1O6wptf/HG3hzfFkWJ1uxDbZoLI8CjCpiYfBym?= =?us-ascii?Q?dY X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: vUPxy39IeXevLN7P/kc0qTRyF+jzT5QV3oDyhBSWOGRUTnlL1d6fmohEJFW7J1oyp1/KmzKrD2JGh84JRvS01swVgXYYF9QQtUKWjqwBCMB1Mas+XHFGnYIyM6958xocPUjcylYnJ9rpVa/2aUwdPOxW2Szra764av6u9MNaurYV4uNzx+d22RQPsRvt93sAa/vgiakh/ske2mi03mfHsrcHWaq83ehjDXmI+s0+mhslBJDgodjPuBmHYbXX3kh6IUustYk23o7S4aqarZqy3yG0rb9XuLCVHkx7jXvGbhsEr/lCIJBzSdbULnPkvaoeV8NtwYZbj8MgZ0lSekenajqjC2koqdi+Lcq35ruXl5acI2AYpzYw0IkictKPzwxZWQovWY3TD2IKCwK0PkY6qoSNoH5u5lVWrhM51IYtLRSNRKbUXedMF3PapUCfrmyEs7ydajDNZB+x3oWyUEn5CXn7mp0X4l5PgVTz7VOWe2N1igTDBDwljfmFjbuYME/ROlkSGtUwTzkXn+iZ+713c1PPP/Um3XPc/KmBBRO/zCzunstqUewxss0xPi6CHWEnz2s3Ru9UXZB9oOnhjZGGnFIIikfvLOGUAnqV1MSzs7aFGmbURI4bGAdt/7ZKTczsDnRPGmuOnOvYx+RCIL8zH0br6Sgggv7sFPO9h0/AW4BAzetUn/Wroo62EwaXSX05PH90fzEKzUtSMBAhuD2mOVn0I9+HrENKuQZQePygur/Lgp CaxBsaArUBemEjKApITmgJtoIidNWoDWIHNdbYSWHzHrKW0rFgyQGgxqd9rJU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e1c7401-b37a-47b2-d3fe-08dad2ff1513 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2022 18:17:03.7836 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DtUBp84plR9MhMlc4RidOq9jUK981qizEsu2mcaGTkgJ8wVEYs8o5KJ/HO+7S+3gArRj+xu0Ex/+A//o1IHHrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB6961 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-30_04,2022-11-30_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 mlxlogscore=978 mlxscore=0 adultscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211300128 X-Proofpoint-ORIG-GUID: BnMGXjJlY3EszjXJpdcyxxbFolXUt5Bm X-Proofpoint-GUID: BnMGXjJlY3EszjXJpdcyxxbFolXUt5Bm Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com 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, 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:141279 Archived-At: > 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. Yes, I mentioned that too: (Or else you have to have saved a reference to that last cons or its cdr. In that case you can get there directly.)