Skip to content

Instantly share code, notes, and snippets.

@darkua
Created May 16, 2010 02:57
Show Gist options
  • Save darkua/402600 to your computer and use it in GitHub Desktop.
Save darkua/402600 to your computer and use it in GitHub Desktop.
proplists_get_value(Key,[H|_] = List) when erlang:is_tuple(H) ->
case lists:keyfind(Key,1,List) of
{K,V} when K =:= Key ->
V;
_->
undefined
end;
proplists_get_value(_,[])->
undefined;
proplists_get_value(Key,[H|Tail]) when erlang:is_atom(H) ->
case Key =:= H of
true->
true;
_->
proplists_get_value(Key,Tail)
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment