This repository has been archived on 2021-12-03. You can view files and clone it, but cannot push or open issues/pull-requests.
2010-04-19 21:08:49 +02:00
|
|
|
Install
|
|
|
|
=======
|
|
|
|
|
|
|
|
gem install functional
|
|
|
|
|
|
|
|
Usage
|
|
|
|
=====
|
|
|
|
|
|
|
|
require 'functional'
|
|
|
|
|
|
|
|
obj = 0 .. 10**12
|
2010-04-19 21:22:30 +02:00
|
|
|
Functional.new( obj).select {|i| i.even? }.collect {|i| i/3 }.select {|i| i.even? }.each &method( :puts)
|
|
|
|
|
|
|
|
What's with _#map_?
|
|
|
|
=================
|
|
|
|
|
|
|
|
Do you know MapReduce? In future #map will be used for MapReduce. Use #collect.
|