Last active
March 19, 2022 02:02
-
-
Save tetsu-miyagawa/13c3b107c83a18d8795a6a093df1985e to your computer and use it in GitHub Desktop.
リストの要素非破壊追加(Elixer)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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