From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Advantage using mapc over dolist Date: Mon, 02 Dec 2024 07:59:07 +0100 Message-ID: <87ed2qpo3o.fsf@gnu.org> 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="34178"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.7; emacs 31.0.50 Cc: Heime To: Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 07:59:49 2024 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 1tI0PN-0008mF-15 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 07:59:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tI0Oq-0004RJ-7V; Mon, 02 Dec 2024 01:59:16 -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 1tI0Om-0004Qt-QG for help-gnu-emacs@gnu.org; Mon, 02 Dec 2024 01:59:12 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tI0Om-0008E5-IP; Mon, 02 Dec 2024 01:59:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=rS9nbW8zcHqov6PMqHREdmuk9Qhgq9PUfX+4nVO0ei4=; b=lfm441cnWo30uQmBhzQh Du8/CqVW1wHe07kq4puaF/GmBTcRW8opfb9wW8eSXcXo47dVKckrq9xpmfRJf3rTOg6i00hmKxvWZ TMQ6Ec6Oh7XMXMbTBjdbs1y3p2W5wlXqfa1QL4o1rN7ccOgGJnOSPJYT+SgJy/UbSG1uOzYS6XkHZ SSxkWxCOxrP98C5BSpbJvuwlF9QCC3l3on8GSaN+M+Xn4V+UZsyqShywhagwhtQi3E2kn2jfmCews TodX7bvhzNAmfRwps5qXyvg9jjaD0082vXM1OlGkMGX9Vm8knviiIFnzfBun2pdYqaLH3H0YqkwDq kLEGqLjUHzU0NA==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrheekgddutddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgesthdtredttdertden ucfhrhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenuc ggtffrrghtthgvrhhnpeeluddvgeefuddvjeekfeetleegtefgveehhfeuffeuffeghefg ueefgfdvffegtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieej feekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilh drfhhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthho pehhvghimhgvsghorhhgihgrsehprhhothhonhhmrghilhdrtghomhdprhgtphhtthhope hhvghlphdqghhnuhdqvghmrggtshesghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail In-Reply-To: (Heime via Users list for the's message of "Sun, 01 Dec 2024 23:31:02 +0000") 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:148485 Archived-At: Heime via Users list for the GNU Emacs text editor writes: > Is there any advantage using mapc over dolist when looping through > a list passed as argument to a function? Not in you example. It can be "better" in terms of brevety when you already have the function defined which you want to execute on each element of the list. Say, that function was foo, then (mapc #'foo list) is a bit shorter than (dolist (item list) (foo item)) But it's essentially a question of preference. Bye, Tassilo