Subject: [erlang-questions] List Question

Hello All,

A Newbie question,

Can I tell the difference Between a List of Strings and a Single

eg the Value in a List may just be "FT" or it might be ["FT", "ST"]

I do not know in advance if its a single string or a list of strings,
but want to behave differently - actually return the first element of
the list when there are multiple values. I have parsed a variable
hierarchical structure and the hierarchy can vary over instances.

As strings are lists "is_list" returns true for both. Is that soluble
or do I need to change the data structure to indicate it. Sorry if
this has obvious answer, but new to erlang.


Best regards,
Andrew McIntyre mailto:[email protected]

sent from a real computer

R&D Director
4/102 Wises Road

erlang-questions mailing list
[email protected]


Programming list archiving by: Enterprise Git Hosting