Skip to content

feat (pipes): Fold Kernel operators that start a pipe chain back into an inline expression#167

Open
s3cur3 wants to merge 1 commit into
emkguts:mainfrom
s3cur3:ty/fold-kernel-pipe
Open

feat (pipes): Fold Kernel operators that start a pipe chain back into an inline expression#167
s3cur3 wants to merge 1 commit into
emkguts:mainfrom
s3cur3:ty/fold-kernel-pipe

Conversation

@s3cur3

@s3cur3 s3cur3 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

This is a readability improvement for Kernel functions in pipe chains. If it's possible to replace piping into a Kernel expression without drastically restructuring the pipeline, it's desirable to do so (in my opinion, at least).

Rewrites things like:

foo
|> Kernel.||(bar)
|> Enum.map(baz)
|> ...

to:

(foo || bar)
|> Enum.map(baz)
|> ...

PR Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • All new and existing tests pass
  • If there are changes to installation, usage, or project overview, I have updated README.md
  • If there are changes to styling, I have updated the relevant /docs/*.md file
  • I have run mix format and committed any changes

… an inline expression

This is a readability improvement for Kernel functions in pipe chains. If it's possible to replace piping into a Kernel expression without drastically restructuring the pipeline, it's desirable to do so (in my opinion, at least).

Rewrites things like:

```
foo
|> Kernel.||(bar)
|> Enum.map(baz)
|> ...
```

to:

```
(foo || bar)
|> Enum.map(baz)
|> ...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant