You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kubsu-sm5-ruby/lab3_task2_funcation_block_arg
Artem-Darius Weber c9a56f66f4
docs: update README.md with method descriptions for ArrayProcessor; add a.txt with sample data
1 month ago
..
lib feat: implement ArrayProcessor class with chunk, include?, reduce, member?, and filter methods; add tests and documentation 1 month ago
test feat: implement ArrayProcessor class with chunk, include?, reduce, member?, and filter methods; add tests and documentation 1 month ago
README.md docs: update README.md with method descriptions for ArrayProcessor; add a.txt with sample data 1 month ago
main.rb feat: implement ArrayProcessor class with chunk, include?, reduce, member?, and filter methods; add tests and documentation 1 month ago

README.md

Run

Run example

ruby ./main.rb

Run test

ruby test/test_array_processor.rb

Methods:

chunk - дробит массив на сущности по результату выполнения кода, even - четные число

include - содержит ли массив элемент

member - аналогично include

reduce - накапливает значения в аккумулияторе складывая все значения

filter - select элементов для который блок вернул true. odd - нечетное число