[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lambda The Ultimate: use failure-thunk instead of default value?
Panu Kalliokoski wrote:
> I've also thought about this. I know the thunk version is more
> expressive. However, I also think that a simple default value is the
> common case. I'd like to have both.
Another alternative might be to have either
;; I prefer this option
(hash-table-get ht key [failure-thunk])
(hash-table-get/default ht key default)
;; However, this would also work
(hash-table-get ht key [default])
(hash-table-get/failure-continuation ht key failure-thunk)
perhaps spelling hash-table-get/failure-continuation as hash-table-get/fk.