all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar@batsov.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Consider adding hash-keys and hash-values
Date: Wed, 30 Oct 2013 11:36:24 +0200	[thread overview]
Message-ID: <CAM9Zgm2yXwAcWPcnEnBy4y_dgu39qEcD+kmBYPvV2O1pQKbYWA@mail.gmail.com> (raw)
In-Reply-To: <1EA2626D6F9E40C799F18421D8FD41B5@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

Any comments for or against the proposal? Should I could consider your
silence a sign of consent and submit a patch?


On 24 October 2013 17:16, Bozhidar Batsov <bozhidar@batsov.com> wrote:

> Hi everyone,
>
> I’ve seen the following functions (or their equivalents) inlined in many
> packages:
>
> (defun hash-keys (hashtable)
>   "Return a list of keys in HASHTABLE."
>   (let ((keys '()))
>     (maphash (lambda (k v) (setq keys (cons k keys))) hashtable)
>     keys))
>
> (defun hash-values (hashtable)
>   "Return a list of values in HASHTABLE."
>   (let ((values '()))
>     (maphash (lambda (k v) (setq keys (cons k values))) hashtable)
>     keys))
>
> Is there any particular reason why we don’t have them as part of the
> standard set of hash functions? They are pretty useful and just about every
> programming language has them in its standard library.
>
> --
> Cheers,
> Bozhidar
>
>

[-- Attachment #2: Type: text/html, Size: 1802 bytes --]

  reply	other threads:[~2013-10-30  9:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24 14:16 Consider adding hash-keys and hash-values Bozhidar Batsov
2013-10-30  9:36 ` Bozhidar Batsov [this message]
2013-10-30 11:06   ` Nathan Trapuzzano
2013-10-30 13:11   ` Stefan Monnier
2013-10-31 12:55     ` Bozhidar Batsov
2013-10-31 13:37       ` Stefan Monnier
2013-11-02 15:27         ` Bozhidar Batsov
2013-11-03  2:38           ` Leo Liu
2013-11-03  7:28             ` Bozhidar Batsov
2013-11-04  5:14               ` Leo Liu
2013-11-03 14:00           ` Stefan Monnier
2013-11-04 11:47             ` Bozhidar Batsov
2013-11-02  3:05     ` Josh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM9Zgm2yXwAcWPcnEnBy4y_dgu39qEcD+kmBYPvV2O1pQKbYWA@mail.gmail.com \
    --to=bozhidar@batsov.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.