[erlang-questions] lists:keyfind as an alternative to lists:keysearch

Christian chsu79@REDACTED
Wed Jan 21 12:30:55 CET 2009


On Wed, Jan 21, 2009 at 12:12, Bengt Kleberg <bengt.kleberg@REDACTED> wrote:
> Greetings,
>
> Rickard has my support. I, too, find mixing boolean and none boolean
> return values surprising.
>
> Perhaps {} (empty tuple) is an appropriate return value if nothing is
> found?

The functions proplists:get_value/2,3 are the less-generalized
versions of this keyfind-function. So for consistency chose
'undefined'. (and provide a Default-argument keyfind function as
well?)



More information about the erlang-questions mailing list