Module: Enumerable

Included in:
Monad::Maybe::List
Defined in:
lib/monad/maybe.rb

Overview

Some monkey patching and constructor methods.

Instance Method Summary collapse

Instance Method Details

#maybe_mapObject



10
11
12
# File 'lib/monad/maybe.rb', line 10

def maybe_map
  Monad::Maybe::List.new(map{ |x| yield(x) })
end