Class: Literal::Maybe Abstract

Inherits:
Monad
  • Object
show all
Defined in:
lib/literal/maybe.rb

Overview

This class is abstract.

Direct Known Subclasses

NothingClass, Some

Instance Method Summary collapse

Methods inherited from Monad

#handle

Instance Method Details

#callvoid

This method returns an undefined value.



6
7
8
# File 'lib/literal/maybe.rb', line 6

def call(&)
	Literal::Case.new(Literal::Some, Literal::Nothing, &)[self].call(@value)
end