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 ~>
- Host: GitHub
- URL: https://github.com/maxmellen/into.ex
- Owner: maxmellen
- License: mit
- Created: 2017-12-08T15:20:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-10T15:55:50.000Z (over 8 years ago)
- Last Synced: 2025-10-21T17:55:42.851Z (8 months ago)
- Topics: elixir, pipe
- Language: Elixir
- Homepage: https://hex.pm/packages/into
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```