We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
An example is worth 1000 words:
import oslash def operation_that_succeeds(input): return oslash.Right(input + 1) def operation_that_fails(input): return oslash.Left("Failure") def lift(m): def w(f): return lambda x: m.unit(f(x)) return w @lift(oslash.Right) def pure_function(input): return input + 1 if __name__ == "__main__": print(operation_that_succeeds(45) | operation_that_succeeds | pure_function | operation_that_succeeds)
How can I rewrite this without needing to implement the lift decorator?
lift
The text was updated successfully, but these errors were encountered:
No branches or pull requests
An example is worth 1000 words:
How can I rewrite this without needing to implement the
lift
decorator?The text was updated successfully, but these errors were encountered: