Recursion Issue

In this case, the last expression in your function is

split(tail, final_list)

which calls split/2 using the same value for final_list that was passed to the function originally. You have already discussed that tail is causing a type error in this case, but regardless, the result of your list concatenation operation is simply thrown away.

1 Like