You are given a nested list of integers. Each element is either an integer or a list — whose elements may also be integers or other lists. Implement a function to flatten it into a single list using recursion.
- A nested list of integers.
Input: nestedList = [[1,1],2,[1,1]]
Output: [1,1,2,1,1]
Input: nestedList = [1,[4,[6]]]
Output: [1,4,6]