dbrattli / Expression

Functional programming for Python
https://expression.readthedocs.io
MIT License
481 stars 32 forks source link

Adding type annotations to curried functions #2

Closed phinate closed 3 years ago

phinate commented 3 years ago

From what I can see in core/curry.py, there's no way to specify type annotations on-the-fly in a meaningful way. However, instead of recommending against usage, is it worth providing a @functools.wraps decorator over the called function so some notion of annotation and docstring is preserved?

It trusts that the user knows what they're doing, of course :)

dbrattli commented 3 years ago

Thanks for the suggestion. I will try to fix it using wraps.