Created
July 1, 2016 14:19
-
-
Save kulicuu/a156656dd90f7d6879a6f52f4d823476 to your computer and use it in GitHub Desktop.
\0__0/ FLATTEN ALL THE RAYYS !!!!! \0__0/
This file contains hidden or 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
| c = -> console.log.apply console, arguments | |
| test_rayy = [[3], [33, 88,[3939, 393], 83333], 8938, 93838] | |
| exports.flatten = cursive_flatten = (acc, rayy) -> | |
| for item in rayy | |
| if Object.prototype.toString.call(item) is '[object Array]' | |
| acc = arguments.callee(acc, item) | |
| else | |
| acc.push item | |
| return acc | |
| c 'flatt!!!: ', cursive_flatten([], test_rayy) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment