module Rumonade::ArrayExtensions::InstanceMethods
Constants
- METHODS_TO_REPLACE_WITH_MONAD
Preserve native
map
andflat_map
methods for performance, andflatten
to support Rails (see issue #8)
Public Instance Methods
bind(lam = nil, &blk)
click to toggle source
# File lib/rumonade/array.rb, line 21 def bind(lam = nil, &blk) inject(self.class.empty) { |arr, elt| arr + (lam || blk).call(elt).to_a } end