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

hash-table-*/default (Re: SRFI 69 update)



On Wed, Aug 31, 2005 at 12:18:55AM +0100, Tony Garnock-Jones wrote:
> [proposed text]
>   Procedure: hash-table-ref/default hash-table key default -> value
> 
>   Behaves as if defined by
>   (define (hash-table-ref/default ht key default-value)
>     (hash-table-ref ht key (lambda () default-value)))
> [end proposed text]

How about "behaves as if it evaluates to"?

By the way, I got no comments to the suggestion that there would be
hash-table-ref* or hash-table-ref/thunk with the current behaviour of
hash-table-ref, and a _macro_ hash-table-ref that expands to the
lambda-wrapped version.  It this alternative, saying hash-table-ref
would really be equivalent (linguistically equivalent, not value
equivalent) to the lambda-wrapped version.

Panu

-- 
personal contact: atehwa@xxxxxx, +35841 5323835, +3589 85619369
work contact: panu.kalliokoski@xxxxxxxxxxx, +35850 3678003
kotisivu (henkkoht):	http://www.iki.fi/atehwa/
homepage (technical):	http://sange.fi/~atehwa/