select, collect, .... all these methods work like a breadth-first search. With functional, it will work like a depth-first search. It's not faster, but it needs lesser memory.
This repository has been archived on 2021-12-03. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
Denis Knauf b51bd564ef ready for gem 2010-04-19 21:08:49 +02:00
lib ready for gem 2010-04-19 21:08:49 +02:00
AUTHORS ready for gem 2010-04-19 21:08:49 +02:00
LICENSE ready for gem 2010-04-19 21:08:49 +02:00
README.md ready for gem 2010-04-19 21:08:49 +02:00
Rakefile ready for gem 2010-04-19 21:08:49 +02:00
VERSION ready for gem 2010-04-19 21:08:49 +02:00

README.md

Install

gem install functional

Usage

require 'functional'

obj = 0 .. 10**12
Functional.new( obj).select {|i| i.even? }.map {|i| i/3 }.select {|i| i.even? }.each &method( :puts)