Determining if an item is a string or a list in Erlang

Posted by Zubair on Stack Overflow See other posts from Stack Overflow or by Zubair
Published on 2010-03-19T18:32:36Z Indexed on 2010/03/19 20:21 UTC
Read the original article Hit count: 131

Filed under:

I am writing a program that can have either a list or a string as an argument. How can I tell the difference between a string and a list programmatically in Erlang. Something like:

print(List) -> list; 
print(String) -> string.

© Stack Overflow or respective owner

Related posts about erlang