Skip to content

Add @curry decorator #350

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

Merged
merged 33 commits into from
May 14, 2020
Merged

Add @curry decorator #350

merged 33 commits into from
May 14, 2020

Conversation

orsinium
Copy link
Contributor

Add 2 decorators for currying. Related to #341. I'm not sure about typing and documentation to say that the PR closes the issue. However, I've tried my best 👀

@orsinium
Copy link
Contributor Author

"Install poetry" job fails, I'm not guilty >.<

@orsinium
Copy link
Contributor Author

Benchmarks:

name                      |      import      [ms] |     decorate     [ms] |       call       [ms] |
                          | min     avg     max   | min     avg     max   | min     avg     max   |
returns.curry:eager_curry | 0.125 - 0.125 - 0.931 | 0.023 - 0.024 - 0.042 | 1.493 - 1.493 - 1.493 |
returns.curry:lazy_curry  | 0.115 - 0.115 - 0.145 | 0.023 - 0.025 - 0.035 | 0.043 - 0.043 - 0.043 |
monads.currying:curry     | 0.177 - 0.177 - 6.332 | 0.361 - 0.375 - 0.480 | 0.456 - 0.456 - 0.456 |

@orsinium

This comment has been minimized.

@sobolevn sobolevn changed the title Add @eager_curry and @lazy_curry Add @curry decorator May 6, 2020
@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #350 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #350   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines          942       966   +24     
  Branches       107       108    +1     
=========================================
+ Hits           942       966   +24     
Impacted Files Coverage Δ
returns/context/__init__.py 100.00% <ø> (ø)
returns/context/requires_context_io_result.py 100.00% <ø> (ø)
returns/context/requires_context.py 100.00% <100.00%> (ø)
returns/curry.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 661b69e...661b69e. Read the comment docs.

@sobolevn sobolevn merged commit bfd1ba4 into dry-python:master May 14, 2020
@sobolevn sobolevn deleted the curry branch May 14, 2020 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants