Skip to content

Instantly share code, notes, and snippets.

@edubkendo
Created April 17, 2015 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edubkendo/16da5462842af082fb8c to your computer and use it in GitHub Desktop.
Save edubkendo/16da5462842af082fb8c to your computer and use it in GitHub Desktop.
Interactive Elixir (1.1.0-dev) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> list = [1, 2, 3]
[1, 2, 3]
iex(2)> new_list = [ 0 | list ]
[0, 1, 2, 3]
iex(3)> [ head | tail ] = new_list
[0, 1, 2, 3]
iex(4)> head
0
iex(5)> tail
[1, 2, 3]
iex(6)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment