-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
Shorter syntax for pattern matching function definitions #465
Comments
I'd like to add this, but I'm not sure what the right syntax should be. Also we'll want to make sure |
I don't know, what you wrote are good points. |
I like the @asyncio.coroutine
def some_function():
... and the modern Regarding your point that The keyword |
This has now been implemented in |
Can we have something like:
as a syntactic sugar for
so that it's closer to Haskell way of defining a function with multiple patterns?
Honestly, having to put
@addpattern(function_name)
before each definition kind of discourages me from doing it this way, instead of something likefactorial = n -> n*factorial(n-1) if n else 1
Of course factorial is just an example and
pdef
could be something entirely different.The text was updated successfully, but these errors were encountered: