📜  Elixir 列表 - Elixir 代码示例

📅  最后修改于: 2022-03-11 14:48:01.858000             🧑  作者: Mango

代码示例2
iex> [1, "two", 3, :four]
[1, "two", 3, :four]

iex> [1, 2, 3] ++ [4, 5, 6]
[1, 2, 3, 4, 5, 6]

iex> [1, true, 2, false, 3, true] -- [true, false]
[1, 2, 3, true]

iex> [head | tail] = [1, 2, 3]
iex> head
1
iex> tail
[2, 3]