-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README: more informative intro sentence #14
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Chain.jl | ||
|
||
Even more convenient than pipes. | ||
A [Julia package](https://julialang.org/packages/) for chaining function calls using a more convenient syntax than Julia's native [piping functionality](https://docs.julialang.org/en/v1/manual/functions/#Function-composition-and-piping). | ||
|
||
<table> | ||
<tr><th>Chain.jl</th><th>Base Julia</th></tr> | ||
|
@@ -30,7 +30,8 @@ df |> | |
</td> | ||
</tr> | ||
<tr> | ||
<th>Pipe.jl</th><th>Lazy.jl</th> | ||
<th><a href="https://github.com/oxinabox/Pipe.jl">Pipe.jl</a></th> | ||
<th><a href="https://github.com/MikeInnes/Lazy.jl">Lazy.jl</a></th> | ||
</tr> | ||
<tr> | ||
<td> | ||
|
@@ -89,6 +90,8 @@ This is very useful to inspect pipeline state during debugging, for example. | |
- Because everything is just lines with separate expressions and not one huge function call, IDEs can show exactly in which line errors happened | ||
- Pipe is a name defined by Base Julia which can lead to conflicts | ||
|
||
For more details, see the [pre-announcement post](https://discourse.julialang.org/t/rfc-pipelesspipes-jl-now-chain-jl/50448). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really think this is necessary, the readme has all the information needed and that thread was mostly about deciding the last details There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I can remove it. I personally find it interesting to be able to follow the early history of projects, but I understand it can add more noise than actual useful information. |
||
|
||
## Example | ||
|
||
An example with a DataFrame: | ||
|
@@ -119,8 +122,7 @@ end | |
|
||
## Alternative one-argument syntax | ||
|
||
If your initial argument name is long and / or the chain's result is assigned to a long | ||
variable, it can look cleaner if the initial value is moved into the chain. | ||
If your initial argument name is long and / or the chain's result is assigned to a long variable, it can look cleaner if the initial value is moved into the chain. | ||
Here is such a long expression: | ||
|
||
```julia | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not really
for chaining function calls
, morefor piping a value through a series of transformation expressions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the correction :) I've applied this change.