Last active
December 16, 2016 11:07
-
-
Save yxhuvud/bfc0bd432da4b66d1570e18b468b0a14 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
data = ['0', '1'] | |
while data.size.even? | |
data = data.each_slice(2).map do |(a, b)| | |
a == b ? '1' : '0' | |
end | |
end | |
data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment