-
Notifications
You must be signed in to change notification settings - Fork 0
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
Friendly ping from dry-python/returns #4
Comments
Hello! I have some free time these days so I'd be happy to work on it. I like the idea of keeping About Python 3.7: the main "problem" is the introduction of the positional-only arguments introduced in 3.8, which Give me a couple of days to get familiar with my own package again; I've been busy with GUI stuff lately, which is as far as FP as you can get, so I need to refresh my memory :D. |
Thanks a lot, @Niriel! I would love to help you with the Let me better explain why I push currying so much for Currently, all types we provide are not actually monads. Because they are not applicative. Some(3).apply(Some(2).apply(Some(1).map(lambda a: lambda b: lambda c: a + b + c))) But, when we would have typed curry, we will be allowed to use: @curry
def some_three(a: int, b: int, c: int) -> int:
return a + b + c
Some(3).apply(Some(2).apply(Some(1).map(some_three))) Which is times better! So, our goal for the next release (not the one we are working on right now) to add Related: dry-python/returns#342 |
I have no idea how to write a MyPy plugin; any help or suggestion would be lovely indeed. What is How "properly typed" are we talking about, though? What signature should I give my I'm curious about your monads. |
@Niriel we have a lot of hacks to fight HKT in python 😆 I have even tried to bring this into a separate As I said, I can take the And I want something similar for @curry
def x(a: int, b: int) -> int:
return a + b
reveal_type(x) # Would be Overloaded([(def a:int -> def x: int -> int), (def a: int, b: int -> int]) And the same for all possible argument types and values, including default values, kw and pos only, args and kwargs. And including Generics and |
Hi @Niriel! Thanks a lot for building this project. It looks amazing.
Currently we are working on better typed FP stack in Python. It has some great results already, but also some limitation.
During this release I am focused on working with callables, recently I did fully typed
partial
function: https://returns.readthedocs.io/en/latest/pages/curry.html And now I researching@curry
decorator. I would ideally love to see something very similar to your solution.So, there are several ways for us to continue:
mypy
plugin and python[3.6, 3.7] supportreturns
project and I will add you as a collaboratorWhat suits you best?
Cheers,
Nikita Sobolev
The text was updated successfully, but these errors were encountered: