Trane Interview Question

Given an array that could contain more arrays, write a recursive function to flatten the array.