On 2018-05-03 19:57, Chris Angelico wrote:
> Got it. Well, I don't see why we can't use Python's existing primitives.
> 
> def hyperop(n, a, b):
>     if n == 0: return 1 + b
>     if n == 1: return a + b
>     if n == 2: return a * b
>     if n == 3: return a ** b
>     if n == 4: return a *** b
>     if n == 5: return a **** b
>     if n == 6: return a ***** b
>     ...

Well, it'd be infinitely long, but I suppose I'd have to concede that
that's in line with the general practicality level of the example.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to