[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hash table read syntax in guile 2.0

From: Daniel Hartwig
Subject: Re: Hash table read syntax in guile 2.0
Date: Mon, 18 Feb 2013 09:00:47 +0800

On 17 February 2013 21:41, Ludovic Courtès <address@hidden> wrote:
> Hi!
> Daniel Hartwig <address@hidden> skribis:
>> +To count all elements:
>> +
>> address@hidden
>> +(hash-count #f h)
> I would instead recommend (hash-count (const #t) h), and remove the
> special case.  WDYT?

A clearer example, sure.  I included the special case as it runs in
constant time, I suppose changing the order and making PRED optional
would be a neater interface.

reply via email to

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