Overview for infinite

Infinite recursion and StackOverflowError in Julia

In order to evoke StackOverflowError in Julia it's enough to write a function, which result in infinite recursion. Let's see, how it works:

julia>

function foo(arg)
           if arg>1
               println("x")
           else
               foo(arg)
           end
       end

And now let's call foo() function with an argument:

julia> foo(1)

Read more

Written by Administrator on Sunday May 10, 2020