Skip to content
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

Add composition as an operator via a new composable class #531

Closed
wants to merge 5 commits into from

Conversation

ruancomelli
Copy link

Overview

Add a new composable class for functions that can be composed via the pipe operator. This idea originated from and was discussed in #523.

In this implementation, I decided not to include any type-annotations. This is because most of (all?) the project lacks type-annotations. Adding such annotations is probably a PR of its own.

Future work

  1. Make other tools classes inherit from composable as well, like curry, juxt, and excepts, as suggested in Idea: compose as an operator #523 (comment).
  2. We can probably make something very similar for the pipe function by creating a pipeable class.

@ruancomelli ruancomelli marked this pull request as draft July 4, 2022 11:04
@ruancomelli
Copy link
Author

Converted to draft because of #523 (comment).
We should first settle on the exact desired behavior before having this PR merged.

Copy link

@GiorgioPicci GiorgioPicci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement, thats will help a lot. Thanks for contribute !!

@ruancomelli
Copy link
Author

I'll close this PR for now since it is unclear how to proceed (see discussion at #523). If it becomes relevant again, we can either open a new PR or reopen it.

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.

2 participants