Hi! Daniel Hartwig <mand...@gmail.com> skribis:
> From ec52416c2060cff11d0cb435df49207e5aa3dc7a Mon Sep 17 00:00:00 2001 > From: Daniel Hartwig <mand...@gmail.com> > Date: Sun, 17 Feb 2013 16:38:31 +0800 > Subject: [PATCH] add hash-count for native tables > > * libguile/hashtab.c (scm_hash_count): New function. Count the number > of elements in a hash table. > > * doc/ref/api-compound.texi (Hash Tables): Update examples and > reference. > > * test-suite/tests/hash.test (hash-count): New test. Looks like a worthy addition. A couple of comments: > +To count all elements: > + > +@lisp > +(hash-count #f h) I would instead recommend (hash-count (const #t) h), and remove the special case. WDYT? > + return scm_oneplus(value); Space before parenthesis. Thanks, Ludo’.