Skip to content

CosmicToast/pipe

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

update pipe.nimble to reflect the correct license
70e0f6f

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Pipe

license

A pipe operator for nim, as seen in functional languages.

Origins

I was looking for a good old |> to use in nim. I found this. It sucked. It wasn't published. It used "example" in its description.

So I decided to write my own, with blackjack and hookers.

Examples

Please take a look in tests/test.nim for examples, but here's a tl;dr:

1 |> `+`(2) |> foo
# is equivalent to
foo(1+2)