[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing hash-table or alist to a function
From: |
Eduardo Ochs |
Subject: |
Re: Passing hash-table or alist to a function |
Date: |
Sat, 14 Sep 2024 10:18:45 -0300 |
On Sat, 14 Sept 2024 at 10:07, Heime <heimeborgia@protonmail.com> wrote:
>
> Have mode the following function
>
> (defvar xiakos-fpln (make-hash-table :test 'equal)
> "Hash table storing paths for different xiakos components.")
>
> Can one distinguish passing a hash-table or an alist to a
> function, how ?
Try:
(setq ht (make-hash-table))
(puthash :key1 :val1 ht)
(puthash :key2 :val2 ht)
ht
(setq al '((:key1 . :val1) (:key2 . :val2)))
al
(hash-table-p ht)
(hash-table-p al)
Cheers,
Eduardo