PipeTo v0.1.1 PipeTo
Summary
Functions
Breaks a pipeline expression into a list. This is where the target position being calculated
Macros
PipeTo operator
Functions
Macros
PipeTo operator.
This operator will replace the placeholder argument _ in the right-hand
side function call with left-hand side expression.
Examples
iex> 1 ~> Enum.at(1..3, _)
2
It can mix with |> operation
Examples
iex> 1 ~> Enum.at(1..3, _) |> Kernel.*(5)
10
When using ~> withou placeholder _, it act just like |> pipe operator.
Examples
iex> [1, 2, 3] ~> Enum.take(2)
[1, 2]