From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: `apply-partially` and hash tables Date: Sun, 20 Oct 2024 17:19:17 +0200 Message-ID: <867ca27qfe.fsf@fastmail.fm> References: <861q0b2jpo.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2389"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier To: Stefan Monnier 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 Sun Oct 20 17:20:21 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 1t2Xj8-0000Qs-Sz for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 20 Oct 2024 17:20:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2XiL-00080v-TM; Sun, 20 Oct 2024 11:19:29 -0400 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 1t2XiJ-00080M-Df for help-gnu-emacs@gnu.org; Sun, 20 Oct 2024 11:19:27 -0400 Original-Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2XiH-0002Om-PR for help-gnu-emacs@gnu.org; Sun, 20 Oct 2024 11:19:27 -0400 Original-Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id CBBFD114017B; Sun, 20 Oct 2024 11:19:24 -0400 (EDT) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sun, 20 Oct 2024 11:19:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1729437564; x=1729523964; bh=jKkJlF7aOX rczIbgQr9c6LcDDv2mRM6V720m6BGpCyE=; b=DMdMoyQUNGYXammtMMdbsTMXwe urxPUkmO765ovvWejRGHGt47n2I5jHWpfvnMse8n9lojo5L+CEfqRbDh4Buz/zr9 QyUxQFWwUvGlsBmiTpR8pHFde1mM1RJYiJz7bVeQkRRZbg2yr2O6eHojKaRYYea5 l975Jcm8o2HdykQ2wEikq7vWJ7PLMwZgANtNFQ3Yhd/8UjILQKR1GvO49Rzo6k7d Zf4K3PdQQHdOcJ5DPd0gfVUji3qW7X/zSBxUVqXBEkgC55vi648C9TLFaXA3mWOS RQebJxV6jZPiD186RQlCN25ik5mk4UWlHFot1t8MBLtBipceGXXy6O/yTZjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1729437564; x=1729523964; bh=jKkJlF7aOXrczIbgQr9c6LcDDv2m RM6V720m6BGpCyE=; b=a1BcwFqFIrQqwjUfqXXVCUOah3kgUo6RczzkDRwWLQz+ YaCCMa1/U87iynNE5yfhax7GkE1WMoxMJo0gmBbE+sg0TJurbIgyxrqCrqqW45Ph o9Yr1UB89xYhnz3P3ioK8Q7sUdZr+TI2m1e4Pxo+4CUpZkWPXL2EsnTm0scbzTxh u795xU80qV1muJVFMWoysBlDmshuidKBVa7cHJA0LqTvB3cEGF8rZhk6eUa/8Dw5 62HKwHjlx1yDAfqma3izqxvcfs5J+B2Xl3qf2r5SSm9bOO64yAI79jGzdn/2Li9O uzgzIngyAxlw02F6E2RQa9mksqGDVlhSp2qqZYp05Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehjedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehttdertddttddtnecu hfhrohhmpeflohhoshhtucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhssehfrg hsthhmrghilhdrfhhmqeenucggtffrrghtthgvrhhnpeekveelieeuleettdefueegvddu kefhgeevleduveeileetkeeggfekhfeuffffieenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgr ihhlrdhfmhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpdhrtghpthhtohep hhgvlhhpqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 20 Oct 2024 11:19:23 -0400 (EDT) In-Reply-To: (Stefan Monnier via Users list for the's message of "Sun, 20 Oct 2024 10:46:19 -0400") Received-SPF: pass client-ip=103.168.172.153; envelope-from=joostkremers@fastmail.fm; helo=fhigh-a2-smtp.messagingengine.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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:148193 Archived-At: On Sun, Oct 20 2024, Stefan Monnier via Users list for the GNU Emacs text editor wrote: >> (let* ((s #s(hash-table test equal data ("MGrt" "Mouton De Gruyter" >> "OTS" "Utrecht School of Linguistics UiL-OTS"))) >> (fn (apply-partially #'parsebib--expand-strings s))) >> (puthash "BW" "Oxford: Blackwell Publishers" s) >> (funcall fn "BW")) >> "Oxford: Blackwell Publishers" > > Nothing to do with hash-tables: > > (let* ((l (list 'a 'b 'c)) > (f (apply-partially #'elt l))) > (list (funcall f 0) > (push 'new (nth 0 l)) > (funcall f 0))) Yeah, I figured it wouldn't be limited to hash tables, that just happened to be the case I ran into. My question is the same, though: can it be relied upon? -- Joost Kremers Life has its moments