Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CosmicToast/pipe
Pipe operator for nim.
https://github.com/CosmicToast/pipe
functional macro nim pipe
Last synced: 3 months ago
JSON representation
Pipe operator for nim.
- Host: GitHub
- URL: https://github.com/CosmicToast/pipe
- Owner: CosmicToast
- License: unlicense
- Created: 2017-06-17T09:12:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-26T00:21:53.000Z (over 3 years ago)
- Last Synced: 2024-07-28T21:57:43.205Z (3 months ago)
- Topics: functional, macro, nim, pipe
- Language: Nim
- Size: 3.91 KB
- Stars: 59
- Watchers: 5
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Pipe #
[![license]](License.md)
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](https://github.com/jaym/nim-pipeline).
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:
```nim
1 |> `+`(2) |> foo
# is equivalent to
foo(1+2)
```[license]: https://img.shields.io/github/license/5pacetoast/pipe.svg