Last active
February 9, 2021 23:56
-
-
Save imoss/2c496d590b4ce4849ca91b2b4b8bb32c 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
class Array | |
def each | |
for i in 0...length | |
yield(self.[](i)) | |
end | |
self | |
end | |
def map | |
ar = [] | |
for i in 0...length | |
ar << yield(self.[](i)) | |
end | |
ar | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment