Last active
August 29, 2015 14:14
-
-
Save Chadtech/94a42c192df766ef2138 to your computer and use it in GitHub Desktop.
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
########### | |
# PROCESS 0 | |
########### | |
A = [ '0', '1', '2', '3' ] | |
B = [ '4', '5', '6', '7' ] | |
C = [ '8', '9', 'a', 'b' ] | |
D = [ 'c', 'd', 'e', 'f' ] | |
chunks = [ A, B, C, D ] | |
content = _.reduce chunks, (memo, chunk) -> | |
memo.concat chunk | |
# content = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' ] | |
########### | |
# PROCESS 1 | |
########### | |
content = [] | |
A = [ '0', '1', '2', '3' ] | |
B = [ '4', '5', '6', '7' ] | |
C = [ '8', '9', 'a', 'b' ] | |
D = [ 'c', 'd', 'e', 'f' ] | |
chunks = [ A, B, C, D ] | |
_.forEach chunks, (chunk) -> | |
_.forEach chunk, (datum) -> | |
content.push datum | |
# content = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment