All Projects → cjen07 → Param_pipe

cjen07 / Param_pipe

Licence: mit
parameterized pipe in elixir: |n>

Programming Languages

elixir
2628 projects
metaprogramming
66 projects

Projects that are alternatives of or similar to Param pipe

Fluids
Fluid dynamics component of Chemical Engineering Design Library (ChEDL)
Stars: ✭ 154 (+1000%)
Mutual labels:  pipe, pipeline
pipe
Functional Pipeline in Go
Stars: ✭ 30 (+114.29%)
Mutual labels:  pipeline, pipe
Onhold
🔊 Play sounds while and after shell jobs complete
Stars: ✭ 146 (+942.86%)
Mutual labels:  pipe, pipeline
Hookah
A cross-platform tool for data pipelines.
Stars: ✭ 83 (+492.86%)
Mutual labels:  pipe, pipeline
pypely
Make your data processing easy
Stars: ✭ 17 (+21.43%)
Mutual labels:  pipeline, pipe
etran
Erlang Parse Transforms Including Fold (MapReduce) comprehension, Elixir-like Pipeline, and default function arguments
Stars: ✭ 19 (+35.71%)
Mutual labels:  pipeline, pipe
Pipeline.rs
☔️ => ⛅️ => ☀️
Stars: ✭ 188 (+1242.86%)
Mutual labels:  pipe, pipeline
Pipeline
Pipeline is a package to build multi-staged concurrent workflows with a centralized logging output.
Stars: ✭ 433 (+2992.86%)
Mutual labels:  pipe, pipeline
tpack
Pack a Go workflow/function as a Unix-style pipeline command
Stars: ✭ 55 (+292.86%)
Mutual labels:  pipeline, pipe
rocket-pipes
Powerful pipes for TypeScript, that chain Promise and ADT for you 🚌 -> ⛰️ -> 🚠 -> 🏂 -> 🚀
Stars: ✭ 18 (+28.57%)
Mutual labels:  pipeline, pipe
pipe-trait
Make it possible to chain regular functions
Stars: ✭ 22 (+57.14%)
Mutual labels:  pipeline, pipe
Ttyplot
a realtime plotting utility for terminal/console with data input from stdin
Stars: ✭ 532 (+3700%)
Mutual labels:  pipe, pipeline
Toil
A scalable, efficient, cross-platform (Linux/macOS) and easy-to-use workflow engine in pure Python.
Stars: ✭ 733 (+5135.71%)
Mutual labels:  pipeline
Cookiecutter
DEPRECIATED! Please use nf-core/tools instead
Stars: ✭ 18 (+28.57%)
Mutual labels:  pipeline
Syntax sugar python
A library adding some anti-Pythonic syntatic sugar to Python
Stars: ✭ 721 (+5050%)
Mutual labels:  pipeline
Aws Boilerplate
Opinionated full stack web app's boilerplate, ready to be deployed to AWS platform.
Stars: ✭ 682 (+4771.43%)
Mutual labels:  pipeline
Brunch
🍴 Web applications made easy. Since 2011.
Stars: ✭ 6,801 (+48478.57%)
Mutual labels:  pipeline
Phila Airflow
Stars: ✭ 16 (+14.29%)
Mutual labels:  pipeline
Lambdacd
a library to define a continuous delivery pipeline in code
Stars: ✭ 655 (+4578.57%)
Mutual labels:  pipeline
Angular Pipes
Useful pipes for Angular
Stars: ✭ 652 (+4557.14%)
Mutual labels:  pipe

ParamPipe

Prerequisite

  • Erlang v21.0
  • Elixir v1.7.3

Installation

def deps do
  [
    {:param_pipe, "~> 0.2.0"}
  ]
end

Tests

  mix test

parameterized pipe in elixir: |n>

  use ParamPipe

  def foo(a, b, c) do
    a*2 + b*3 + c*4
  end

  def bar0() do
    100 |> div(5) |> div(2) # 10
  end

  # negative n in |n> is supported

  def bar1() do
    1 |0> foo(0, 0) |1> foo(0, 0) |-1> foo(0, 0) # 24
  end

  # mixed usage with |> is supported

  def bar2() do
    1
    |> foo(0, 0) # 2
    |1> foo(0, 0) # 6
    |> div(2) # 3
    |> div(3) # 1
    |2> foo(0, 0) # 4
    |> (fn x -> foo(0, 0, x) end).() # 16
    |-1> foo(0, 0) # 64
  end

  # assigning a variable within the pipe operator is supported

  def bar3() do
    h =
      1
      |-2> foo(0, 0) = f # 3 = f
      |-1> foo(0, 0) # 12
      |> foo(0, 0) = g # 24 = g
      |-1> foo(0, 0) # 96
      |> foo(f, g) # 297
    h
  end
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].