josephwilk / amrita

A polite, well mannered and thoroughly upstanding testing framework for Elixir
200 stars 28 forks source link

Support &&1 in pipeline #78

Closed josephwilk closed 10 years ago

josephwilk commented 10 years ago

Currently this fails:

fact "&& in pipeline" do
  [1, [2], 3] |> List.flatten |> Enum.map(&(&1 *2)) |> [2, 4, 6]
end

With error

** (ArgumentError) Unsupported expression in pipeline |> operator: Enum.map(&&1 * 2)

Compare from the iex

[1,2,3] |> Enum.map(&(&1 * 2))
#|> [2, 4, 6]

We need to adjust the pipeline macro to support && syntax.

Born out of issue #77