Compilation does not terminate for recursive function
I'm porting some C++ with templates, and I realize that there is no such thing as
if constexpr
in mojo. Im trying to write something similar to the following test. However, compilation (not surprisingly) does not terminate.
Question: how do other people handle these straightforward recursive functions?
2 Replies
I believe
@parameter if
in Mojo is quite similar to if constexpr
in C++ -- does that work?@Alex Kirchhoff Thank you, Yes that solves my issues. I missed that somewhat important line in the doc.