An open API service indexing awesome lists of open source software.

https://github.com/maxmellen/into.ex

Collect the result of a pipe expression into a variable with ~>
https://github.com/maxmellen/into.ex

elixir pipe

Last synced: 1 day ago
JSON representation

Collect the result of a pipe expression into a variable with ~>

Awesome Lists containing this project

README

          

# Into

Collect the result of a pipe expression **into** a variable with `~>`

```elixir
import Into, only: [~>: 2]

[1, 2, 3]
|> Enum.reduce(&+/2)
~> sum

sum == 6
```

## Installation

The package can be installed by adding `into` to your list of dependencies in
`mix.exs`:

```elixir
def deps do
[
{:into, "~> 0.1.0"}
]
end
```