my version of Ruby’s enumerable methods. Custom implementation of the Enumerable module method, methods that provides lots of handy iteration capabilities
To get a local copy up and running follow these simple example steps.
- Clone or download this repository to your local workstation.
Since all the code is written using ruby Ruby Runtime >= 1.9
is required to interpret the code. if you don't have ruby runtime installed on your computer
follow the instruction for your specific operating system on the official installation guide
After you have downloaded and have a local copy on your computer, open the folder using your terminal/commandline window and run
ruby iterators.rb
- #my_each method
Implementation of
#each
- #my_each_with_index method
Implementation of
#each_with_index
- #my_select (#my_find_all, #my_filter) method
Implementation of
#select, find_all, filter
- #my_all? method
Implementation of
#all?
- #my_any? method
Implementation of
#any?
- #my_none? method
Implementation of
#none?
- #my_count method
Implementation of
#count
- #my_map method
Customize Implementation of
#map
. this method will now takeProc
as an argument unlike the original one. if bothProc
andblock
is givenProc
will have precedence - #my_inject (#my_reduce) method
Implementation of
#inject, (#reduce)
- #multiply_els method
New method only created for testing
my_inject
method
👤 Mikael Araya
- Github: @mikearaya
- Twitter: @mikearaya12
- Linkedin: linkedin
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is MIT licensed.