[erlang-questions] Easy way to spot undefined & empty lists?

Vik Olliver vik@REDACTED
Tue Apr 14 06:54:46 CEST 2009


On 14/04/09 Richard O'Keefe wrote:
>
>  parse_result(Foo) when Foo == undefined ; Foo == "" ->
>     {error, "String not defined"}.
>
>  This removes the duplication, but makes the patterns
>  harder to see.

That's the one I was looking for.

It was hard to write, it's meant to be hard to understand! :)

Vik :v)



More information about the erlang-questions mailing list