Get current value while piping (something like &1)

There is no &1 syntax in pipes. However, you can rewrite you pipe into

foo
|> ...
|> add_bar()
|> Map.fetch!(:bar)
|> something()
|> do_more()

Or you can use then like

foo
|> ...
|> add_bar()
|> then(&something(&1, &1.bar))
|> do_more()

Don’t forget to mark the correct answer