feat: add pipe function - #373
Conversation
Benchmark Results
Performance regressions of 30% or more should be investigated, unless they were anticipated. Smaller regressions may be due to normal variability, as we don't use dedicated CI infrastructure. |
|
Hey @nusohiro, thanks for putting this together! I appreciate you thinking about ways to improve Radashi. The That said, I'm hesitant to merge this in because it feels like it might be opening the door to bringing in more pure functional utilities. For developers wanting this kind of functionality, I'd suggest using one of the dedicated libraries that specialize in functional programming patterns. I'll keep the PR open so others in the community can find it and easily add it to their own Radashi implementations if they prefer this approach. |
|
@aleclarson I understand your concerns and appreciate the suggestion. Thanks for maintaining Radashi! |
Summary
This PR adds the
pipefunction.The function applies a series of functions to an initial value in sequence, passing the result of each function to the next. It returns the final transformed value without modifying the original input.
Related issue, if any:
N/A
For any code change,
Does this PR introduce a breaking change?
No
Bundle impact
src/function/pipe.tsFootnotes
Function size includes the
importdependencies of the function. ↩