Piping

Wikipedia describes a software pipeline as a "chain of processing elements, arranged so that the output of each element is the input of the next". Julia has native piping functionality in the |> operator, allowing f(g(x)) to be written as x |> g |> f. However, once you want to do mode advanced operations like using multi-argument functions, the core functionality is lacking. A pull-request was created to address this in 2017, but progress has halted. Instead, there is now a number of different packages that implement advanced piping, in slightly different flavours.

The different packages that implement more advanced piping functionality are listed in the table of contents below

Packages

Chain.jl

GitHub Repo stars deps Chain Downloads
GitHub last commit (branch) version
Chain.jl is the most starred package that purely implements piping functionality. It describes itself as follows:

A Julia package for piping a value through a series of transformation expressions using a more convenient syntax than Julia's native piping functionality.

Lazy.jl

GitHub Repo stars deps Lazy Downloads
GitHub last commit (branch) version
Lazy.jl implements a lot of other functionality, but discussed piping in particular under this section of the readme

Pipe.jl

GitHub Repo stars deps Pipe Downloads
GitHub last commit (branch) version
Pipe.jl describes itself as follows:

An enhancement to julia piping syntax

Star history

This website is a community effort covering a lot of ever-changing information. It will therefore never be complete or without error. If you see something wrong, or have something to contribute, please see the "Contributing" section in the github repository.

Last modified: May 03, 2024. Built with Franklin.jl