Syntax sugar for pipeline operator

66 views
Skip to first unread message

Валентин Васильев

unread,
Mar 19, 2017, 2:25:54 PM3/19/17
to elixir-lang-core
Hey all!

Is it possible to implement =|> pipeline operator which behaves as:

conn = conn |> put_req_header( "accept", "application/json")
                     |> get( page_path( conn, :index))

is equivalent to:

conn =|> put_req_header( "accept", "application/json")
           |> get( page_path( conn, :index))

It's a little bit annoying to write the conn = conn |> … construction
in phoenix tests over and over again.

————————
Valentin Vasilev
mailto: flo...@ya.ru
Reply all
Reply to author
Forward
0 new messages