#musttail, guarantee taill call?

1 messages · Page 1 of 1 (latest)

rancid timber
tawny gorge
#

That's at the call site though, not where the function is defined

rancid timber
#

Makes sense i’ll try it out

rancid timber
#

Doesn’t seem to like a call to a function that can raise an error

#

IR generated check for an error before returning

tiny agate
#

as long as it's a plain return ... it's fine

#

if you do return ... catch ... you can't tailcall

rancid timber
#

So if an error can occur elsewhere in the function body it doesn’t work?

tiny agate
#

before the return is fine

#

if you have a more complex expression in the return than just a function call, you cannot tailcall

#

that's the only limitation