How can get the type of a list. I want to execute the code if the list is proplist. Let us say L = [a,1,b,2,c,3, ...]. Is the list L, I\'m converting it to pro
L = [a,1,b,2,c,3, ...]
You can use something like:
is_proplist([]) -> true; is_proplist([{K,_}|L]) when is_atom(K) -> is_proplist(L); is_proplist(_) -> false.
but necessary to consider that this function cannot be used in guards.