Skip to content

drewblas/pipper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipper

Pipper provides the <|> operator as a shorthand macro:

import Pipper

# This:
list = [1,2,3]
list <|> Enum.map(&(&1 * 2))
IO.inspect list # list == [2,4,6]

# Equivalent to:
list = [1,2,3]
list = list |> Enum.map(&(&1 * 2))
IO.inspect list

Wishes and Dreams

=|> would be a better operator, to make the assignment clearer. But it's not available.

Installation

If available in Hex, the package can be installed as:

  1. Add pipper to your list of dependencies in mix.exs:

    def deps do [{:pipper, "~> 1.0.0"}] end

  2. Ensure pipper is started before your application:

    def application do [applications: [:pipper]] end

About

An elixir "pipe-equals" operator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages