3 ms·
First thing I tried was a small lambda function and it worked! Then I tried some Fibonacci with tail recursion and surprisingly that worked too. I'm impressed
by jedberg 2y ago
First thing I tried was a small lambda function and it worked! Then I tried some Fibonacci with tail recursion and surprisingly that worked too. I'm impressed, because often when people reimplement the Python interpreter they get those wrong.
- tusharsadhwani 2y agothat's because it's not a reimplementation, it is cpython recompiled to wasm.
- pxc 2y ago> Then I tried some Fibonacci with tail recursion and surprisingly that worked too. I'm impressed, because often when people reimplement the Python interpreter they get those wrong. Huh? I thought Python didn't have TCO anyway. Guido had a whole blog post about why it supposedly doesn't belong in Python: https://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html https://neopythonic.blogspot.com/2009/04/tail-recursion-elim...