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: Stefan Monnier
Subject: Re: `apply-partially` and hash tables
Date: Sun, 20 Oct 2024 10:46:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> (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)))


- Stefan




reply via email to

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