Hey

[7] == '\a'

Single quote strings are actually lists of characters, so when you have a
list of numbers that can be treated as characters Elixir will print them as
like so.

Cheers,
Louis

On 9 Aug 2016 01:15, "Bibek Pandey" <[email protected]> wrote:

> Hi all --
>
> I'm getting a '\a' when trying to insert into an empty list.  Doesn't
> appear to be expected behavior.
>
> $ iex
> Erlang/OTP 19 [erts-8.0.2] [source-9503fff] [64-bit] [smp:2:2]
> [async-threads:10] [hipe] [kernel-poll:false]
>
> Interactive Elixir (1.3.2) - press Ctrl+C to exit (type h() ENTER for help)
> iex(1)> List.insert_at([], 0, 7)
> '\a'
> iex(2)> List.insert_at([], 1, 7)
> '\a'
> iex(3)> List.insert_at([], 2, 7)
> '\a'
> iex(4)> List.insert_at([3], 2, 7)
> [3, 7]
> iex(5)> List.insert_at([3], 0, 7)
> [7, 3]
> iex(6)> List.insert_at([3], 1, 7)
> [3, 7]
> iex(7)>
>
>
> Thanks B
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/elixir-lang-talk/CAF5zmfxOVPpDqVCQCTjHy5gJwEW74
> JbHH2m6BK3ADRubD5GoPA%40mail.gmail.com
> <https://groups.google.com/d/msgid/elixir-lang-talk/CAF5zmfxOVPpDqVCQCTjHy5gJwEW74JbHH2m6BK3ADRubD5GoPA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/CAM-pwt61FeN4x_gk3yn5D9oik5bM8shDU%3DwgD8orQoe27xxPuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to