This isnt what I want differentiate a string from a list in Erlang
I want to detect if a variable is a list ([1,2,3]) but when I try with is_list it is true for strings also
List = [2,4,6,8],
String = "example text",
%% Returns true
If is_list(List)->
io:fwrite("is a list");
true ->
io:fwrite("is NOT a list")
end.
%% Also returns true
If is_list(String)->
io:fwrite("is a list");
true ->
io:fwrite("is NOT a list")
end.