In elixir we can concatenate lists like this
ex(52)> [1,2,3,4] ++ [5,6,7] [1, 2, 3, 4, 5, 6, 7]
Can tuples be concatenated? Something like that?
iex(53)> {1,2,3,4} ++ {5,6,7} ** (ArgumentError) argument error :erlang.++({1, 2, 3, 4}, {5, 6, 7})
The only thing I can think of is to convert the tuple to a list, and then convert it back to a tuple using the to_list and to_tuple . But this way is too awkward.
elixir
User314159
source share