3 ms·
FWIW you can pass to other arguments than first in this syntax ``` params |> Map.get("user") |> create_user() |> (¬ify_admin("signup", &1)).() ``` or
by bnchrch 1y ago
FWIW you can pass to other arguments than first in this syntax
```
params
|> Map.get("user")
|> create_user()
|> (¬ify_admin("signup", &1)).()
```
or
```
params
|> Map.get("user")
|> create_user()
|> (fn user -> notify_admin("signup", user) end).()
```
- Terr_ 1y agoBTW, there's a convenience macro of Kernel.then/2 [0] which IMO looks a little cleaner: params |> Map.get("user") |> create_user() |> then(¬ify_admin("signup", &1)) params |> Map.get("user") |> create_user() |> then(fn user -> notify_admin("signup", user) end) [0] https://hexdocs.pm/elixir/1.18.3/Kernel.html#then/2 https://hexdocs.pm/elixir/1.18.3/Kernel.html#then/2