This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Flatten an array of arbitrarily nested arrays. For example, | |
* | |
* [[1,2,[3]],4] -> [1,2,3,4] | |
* | |
* It will flatten nested arrays containing not only integer data, but any data. | |
* | |
* Caveat: It does operate recursively, so make sure the nested array fits | |
* within the capabilities of your stack. | |
* |