Created
June 18, 2020 14:09
-
-
Save ruvaleev/c9619b8daf0ff7d358c0350507f38298 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
def custom_reverse(array) | |
array.each_with_object([]) { |i, result| result.unshift(i) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment