pxeger / whython

Fork of Python with some terrible custom features hacked in
https://www.pxeger.com/2021-09-19-hacking-on-cpython/
Other
16 stars 3 forks source link

Callable integers #14

Open mvirts opened 2 years ago

mvirts commented 2 years ago

Make integers callable Possible implement this with iterable integers and callable iterators

100(lambda x: print(f"hi {x}"))

could be equivalent to

`def call_int(int,arg_callable): for i in range(100): arg_callable(i)

usage like

10(10(lambda x:lambda y: print(x*y)))

could be interesting.