Skip to content

Instantly share code, notes, and snippets.

@tetsu-miyagawa
Last active March 19, 2022 02:02
Show Gist options
  • Save tetsu-miyagawa/13c3b107c83a18d8795a6a093df1985e to your computer and use it in GitHub Desktop.
Save tetsu-miyagawa/13c3b107c83a18d8795a6a093df1985e to your computer and use it in GitHub Desktop.
リストの要素非破壊追加(Elixer)
iex> list1 = [3, 2, 1]
[3, 2, 1]
iex> list2 = [4 | list1]
[4, 3, 2, 1]
iex> list1
[3, 2, 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment