unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: David Thompson <dthompson2@worcester.edu>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guile-devel <guile-devel@gnu.org>
Subject: Re: [PATCH] Add procedures to convert alists into hash tables
Date: Sun, 17 Nov 2013 22:22:32 -0500	[thread overview]
Message-ID: <87bo1i75s7.fsf@netris.org> (raw)
In-Reply-To: <52897E7B.6000602@worcester.edu> (David Thompson's message of "Sun, 17 Nov 2013 21:42:03 -0500")

Hi David,

David Thompson <dthompson2@worcester.edu> writes:

> +@deffn {Scheme Procedure} alist->hash-table alist
> +@deffnx {Scheme Procedure} alist->hashq-table alist
> +@deffnx {Scheme Procedure} alist->hashv-table alist
> +@deffnx {Scheme Procedure} alist->hashx-table hash assoc alist
> +Convert @var{alist} into a hash table. When keys are repeated in
> +@var{alist}, the leftmost association takes precedence.
> +
> +@example
> +(use-modules (ice-9 hash-table))
> +(alist->hash-table '((foo . 1) (bar . 2)))
> +@end example
> +
> +When converting to an extended hash table, custom @var{hash} and
> +@var{assoc} procedures must be provided.
> +
> +@example
> +(alist->hash-table hash assoc '((foo . 1) (bar . 2)))

This should be 'alist->hashx-table'.
Other than that, the patch looks good to me!

     Mark



  reply	other threads:[~2013-11-18  3:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-20 14:14 [PATCH] Add procedures to convert alists into hash tables David Thompson
2013-10-20 14:28 ` David Thompson
2013-10-21 17:00   ` Mark H Weaver
2013-10-22  3:03     ` David Thompson
2013-10-28 12:17       ` Chris K. Jester-Young
2013-10-28 23:51         ` David Thompson
2013-10-26 11:41     ` David Thompson
2013-10-29 12:38 ` Ludovic Courtès
2013-10-30 20:19   ` Thompson, David
2013-11-03 12:43     ` Thien-Thi Nguyen
2013-11-05 19:57     ` Mark H Weaver
2013-11-06 12:54       ` Ludovic Courtès
2013-11-06 13:14         ` Thompson, David
2013-11-18  1:50         ` David Thompson
2013-11-18  2:42           ` David Thompson
2013-11-18  3:22             ` Mark H Weaver [this message]
2013-11-18 20:32             ` Ludovic Courtès
2013-11-19  2:00               ` David Thompson
2013-11-19  4:06                 ` Mark H Weaver
2013-11-19 13:14                   ` Thompson, David
2014-03-24 21:06               ` Andy Wingo
2014-03-24 22:15                 ` Ludovic Courtès
2014-03-24 22:26                   ` Andy Wingo

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=87bo1i75s7.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=dthompson2@worcester.edu \
    --cc=guile-devel@gnu.org \
    --cc=ludo@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).