10 lines
210 B
Text
10 lines
210 B
Text
iex(1)> fruit = [:apple, :banana, :cherry]
|
|
[:apple, :banana, :cherry]
|
|
iex(2)> hd(fruit)
|
|
:apple
|
|
iex(3)> tl(fruit)
|
|
[:banana, :cherry]
|
|
iex(4)> hd(fruit) == :apple
|
|
true
|
|
iex(5)> tl(fruit) == [:banana, :cherry]
|
|
true
|