Join Slack
Powered by
which, of course, works
# announcements
p
pavel
02/13/2019, 11:58 PM
which, of course, works
g
ghedeon
02/14/2019, 12:08 AM
in theory, if your function is tailrec than it's compiled into a loop and could be inlined. But I'm afraid the inline tailrec is not supported yet.
s
SOFe
02/14/2019, 2:18 PM
@pavel
you might be interested in this new answer by me:
https://stackoverflow.com/a/54692556/3990767
SOFe
02/14/2019, 2:19 PM
It does not require tail recursion, but suffers from creation of anonymous classes
SOFe
02/14/2019, 2:20 PM
I personally consider it as a bad practice to declare an anonymous class inside an inline function though
SOFe
02/14/2019, 2:20 PM
but this is where you need it
SOFe
02/14/2019, 2:25 PM
hmm, looking at it again, maybe it's more or less the same as the first answer's first method
p
pavel
02/14/2019, 5:47 PM
Yeah, it’s more or less the same. I went with something similar. It’s not aesthetically pleasing, but it works
3
Views
Open in Slack
Previous
Next