Hi,
I cannot for the life of me get lists:keyfind to work as I expect in Erlang.
I have the following eunit test:
should_find_key_test() ->
NewList = lists:keystore("key", 1, [], {"key", "value"}),
Value = case lists:keyfind("key", 1, NewList) of
false ->
notfound;
{_key, _value} ->
_value
end,
?debugVal(Value).
Whenever I run this test I get the following error message:
indextests:should_find_key_test (module 'indextests')...failed ::error:undef in function lists:keyfind/3 called as keyfind("key",1,[{"key","value"}]) in call from indextests:should_find_key_test/0
Can anyone see what I am doing wrong?
Is it saying that lists:keyfind no longer exists?
Cheers
Paul