Pipeline assignment shorthand?

Is there a shorthand for writing the following without repeating list twice?

list = list
|> do_fu
|> do_bar

No. Assignment is an important thing to notice, the part where it stands out is intentional. Often you’ll see code like:

list =
  list
  |> foo
  |> bar

to further accent the difference.

4 Likes