The code you showed works. However, we usually try to reduce the number of single use variables. So, the “Elixir way” of writing that code is
var1 =
123
|> get_new_value(:something)
|> get_new_value(:something2)
Furthermore, if it was the last statement in a function, then we would drop the var1 like this:
def my_fun do
# ...
123
|> get_new_value(:something)
|> get_new_value(:something2)
end


















