Adding element into list with pipe operator

Is it normal to get this result ?

Enum.each(1..128, fn i -> IO.inspect([i | []]) end)
[1]
[2]
[3]
[4]
[5]
[6]
'\a'
'\b'
'\t'
'\n'
'\v'
'\f'
'\r'
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
[26]
'\e'
[28]
[29]
[30]
[31]
' '
'!'
'"'
'#'
'$'
'%'
'&'
'\''
'('
')'
'*'
'+'
','
'-'
'.'
'/'
'0'
'1'
'2'
'3'
'4'
'5'
'6'
'7'
'8'
'9'
':'
';'
'<'
'='
'>'
'?'
'@'
'A'
'B'
'C'
'D'
'E'
'F'
'G'
'H'
'I'
'J'
'K'
'L'
'M'
'N'
'O'
'P'
'Q'
'R'
'S'
'T'
'U'
'V'
'W'
'X'
'Y'
'Z'
'['
'\\'
']'
'^'
'_'
'`'
'a'
'b'
'c'
'd'
'e'
'f'
'g'
'h'
'i'
'j'
'k'
'l'
'm'
'n'
'o'
'p'
'q'
'r'
's'
't'
'u'
'v'
'w'
'x'
'y'
'z'
'{'
'|'
'}'
'~'
[127]
[128]

Yup! Checkout Binaries, strings, and charlists - The Elixir programming language

4 Likes

This is not about the pipe operator :slight_smile:

1 Like

neither about the cons operator :sweat_smile: