Hello, On Sat, 13 Feb 2021 09:24:51 -0800 Matthias Bussonnier <[email protected]> wrote:
> Works well with 0 parameters and currying, read almost like a haskell > function definition. > > f = () => ((b) => b) > g = (a) => (b) => b+a > h = (a) => (b) => (b, a) > i = (a,b) => a > > print(f()(2)) > print(g(1)(2)) > print(h(1)(2)) > print(i(1, 2)) Thanks for testing! Yeah, I didn't even think about recursive syntax cases, glad to know they work out of the box. Seems like writing macros for Python isn't that hard, even on the token stream level. And this comparison with Haskell - don't know if it's good or bad. Definitely feels a bit scary ;-). We'll see how this idea goes... [] -- Best regards, Paul mailto:[email protected] _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/R7QVXQIOMATKUGE2U3KWBAPIVAJPZVJB/ Code of Conduct: http://python.org/psf/codeofconduct/
