summaryrefslogtreecommitdiff
path: root/src/code/1/lists
blob: 836d30b04bc0fb2080e61630f2b3f791798cbe92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
iex> []
[]
iex> [1, 2, 3,]
[1, 2, 3]
iex> [1, :a, ['b']]
[1, :a, ['b']]
iex> [104, 101, 108, 108, 111]
'hello'
iex> 'hełło'
'hełło'
iex> 'こにちは、世界'
[12371, 12395, 12385, 12399, 12289, 19990, 30028]

iex> hd([1, 2, 3,])
1
iex> tl([1, 2, 3])
[2, 3]
iex> [1] ++ [2, 3]
[1, 2, 3]
iex> [1, 2, 3] -- [1]
[2, 3]