Created
September 4, 2017 09:41
-
-
Save oieioi/38cea6852c067e7ce7f94cd1992d9de5 to your computer and use it in GitHub Desktop.
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
def one_jump str | |
str | |
.split('') | |
.map.with_index{|c, index| | |
if index % 2 === 0 | |
c | |
else | |
nil | |
end | |
}.compact.join | |
end | |
puts one_jump "aiueo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment