Skip to content

jaym/nim-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pipeline

An example Nim macro that creates a pipeline operator (ie, Elixir, FSharp). For example, a function call foo(bar(1), "baz") can be written as bar(1) |> foo("baz")

Example

import pipeline

proc times(a, b: int) : int =
  result = a * b

proc plus(a, b: int) : int =
  result = a + b

echo plus(10,2) |> 
     times(2)   |>
     plus(1)

About

Pipline operator for Nim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages