[Feature] syntactic sugar for piping streams
- Dominant language
- Rust
- Stars
- 5.2k
- Forks
- 145
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 7
Description
Presumably it is currently possible to pipe inside a `$` command?
```
echo $ ls | wc $
```
But it would be useful to establish some kind of native syntax for piping that would work even if the commands were wrapped in functions. Something like this:
```
pub fun list(path): Pipe {
yield from $ ls -l {path} $
...do other stuff...
}
pub fun count_words(input: Pipe) {
feed input to $ wc $
}
list(".") => pipe1
pipe1 => count_words
list(".") => count_words
```
That general idea anyway. It'd need to support asynchronous commands, both self-forking and non-self-forking. Or possibly some kind of "composition":
```
cmd = compose list(".") => count_words
run cmd
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.