[erlang-questions] tail and head

Vlad Dumitrescu <>
Tue Jul 22 09:15:32 CEST 2008


Hi,

You can, it's only that 'head' is actually called 'hd' and 'tail' is 'tl'.

hd([1,2,3])
1

regards,
Vlad

2008/7/22 Circular Function <>:

> why cant i do head([1,2,3]). or head [1,2,3]. ?
>
> head and tail aren't real commands just abstract ones so I always have to
> do the following?
> [A:B]=[1,2,3].
> A.
> 1
> B.
> [2,3]
>
> ------------------------------
> Ta semester! - sök efter resor hos Kelkoo.
> Jämför pris på flygbiljetter och hotellrum:
> http://www.kelkoo.se/c-169901-resor-biljetter.html<http://www.kelkoo.se/c-169901-resor-biljetter.html?partnerId=96914051>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080722/8c9693c0/attachment.html>


More information about the erlang-questions mailing list