[erlang-questions] Practical Erlang Programming
Kostis Sagonas
kostis@REDACTED
Fri Feb 22 21:02:29 CET 2008
fess wrote:
>
> Here are some dumb hicups I encountered on my way into erlang:
>
> Somehow I glossed over in joes book the bit pointing out
> that [ $m,$a,$t,$c,$h | Tail ] is the same as [ "match" | Tail ]
> which is so much nicer.
It's actually good that you missed this in Joe's book because it is not
the same...
Instead, [ $m,$a,$t,$c,$h | Tail ] is the same as "match" ++ Tail
This is exactly the problem in people getting so much used in IO lists:
they end up thinking that flattened vs. unflattened lists are the same.
They are not.
Cheers,
Kostis
More information about the erlang-questions
mailing list