vic/pipe_here
An Elixir macro for easily piping arguments at any position.
{ "defaultBranch": "master", "description": "An Elixir macro for easily piping arguments at any position.", "fullName": "vic/pipe_here", "homepage": "http://hex.pm/packages/pipe_here", "language": "Elixir", "name": "pipe_here", "pushedAt": "2017-02-20T22:54:47Z", "stargazersCount": 34, "updatedAt": "2023-09-01T11:26:34Z", "url": "https://github.com/vic/pipe_here"}PipeHere 
Section titled “PipeHere ”An Elixir macro for easily piping arguments at any position.
import PipeHereThe pipe_here macro lets you specify the argument position
while piping values by using the _ placeholder.
For example:
pipe_here( 2 |> x(1, _, 3) )
# expands to
x(1, 2, 3)The pipe_here macro can also be used at the end of a pipe:
2 |> x(1, _, 3) |> pipe_hereNote that while you can do stuff like:
a |> b(1, _) |> c |> d.(2, _, 3) |> pipe_hereevery member of the pipe can at most have just one _ placeholder.
Installation
Section titled “Installation”Available in Hex, the package can be installed as:
- Add pipe_here to your list of dependencies in
mix.exs:
def deps do [{:pipe_here, "~> 1.0.0"}]endIs it any good?
Section titled “Is it any good?”マクロス Makurosu
Section titled “マクロス Makurosu”[Elixir macros,] The things I do for beautiful code ― George Martin, Game of Thrones