help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `apply-partially` and hash tables


From: Joost Kremers
Subject: Re: `apply-partially` and hash tables
Date: Sun, 20 Oct 2024 17:19:17 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]