Class: Hash
Instance Method Summary collapse
Instance Method Details
#fmap(&bl) ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/fmap.rb', line 59 def fmap(&bl) new_h = self.class.new self.each do |k, v| new_h[k.fmap(&bl)] = v.fmap(&bl) end bl.call( new_h ) end |