Why does this scala tail recursive function throws java.lang ...

Why does this scala tail recursive function throws java.lang ...

More to explore