[erlang-questions] List of strings problem

Taras Halturin <>
Thu Jul 20 09:31:14 CEST 2017


Just to be sure...

Erlang/OTP 19 [erts-8.2.1] [source] [64-bit] [smp:4:4] [async-threads:10]
[kernel-poll:false]

Eshell V8.2.1  (abort with ^G)
1> D = [ "sam1", "sam2" ].
["sam1","sam2"]
2> [H|T] = D.
["sam1","sam2"]
3> [H2|T2] = T.
["sam2"]
4> T2.
[]
5> H2.
"sam2"
6>

It works as you expected.

On Thu, Jul 20, 2017 at 10:00 AM, Éric Pailleau <>
wrote:

> Hi,
> T is already sam2.
> Strings are list so try [H2|T2]=[T] ...
> Regards
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>


-- 
Best Regards.
Taras Halturin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170720/7ff9f124/attachment.html>


More information about the erlang-questions mailing list