Module: Algebrick::Types::Maybe

Defined in:
lib/algebrick/types.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) maybe



24
25
26
27
28
# File 'lib/algebrick/types.rb', line 24

def maybe
  match self,
        on(None, nil),
        on(Some) { yield value }
end