Alex Shinn scripsit:
How is this different from hash-table-replace?
> I also think the following utility is nice, as there is no other
> existing utility to use a hash-table as a cache with a single
> operation:
>
> (hash-table-ref/cache! table key thunk)
> => (hash-table-search
> table key
> (lambda (value update remove)
> value)
> (lambda (insert)
> (let ((res (thunk)))
> (insert res)
> res)))
_______________________________________________ Scheme-reports mailing list Scheme-reports@x http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports