[newbie] refactor function?

Bengt Kleberg bengt.kleberg@REDACTED
Tue Feb 1 17:52:42 CET 2005


Gaspar Chilingarov wrote:
...deleted
> one question to clarify thing -- when i have function, which splits list 
> to head and tail, i always need to have separate clause for empty list 
> case, am i ?

yes, if it is ok to get an empty list as an argument.
if you know/expect/mandate that the argument list should always have a 
head and a tail you do not need a clause for the empty list.


bengt



More information about the erlang-questions mailing list