class Monadist::Identity

Attributes

value[R]

Public Class Methods

new(value) click to toggle source
# File lib/monadist/identity.rb, line 8
def initialize(value)
  @value = value
end
unit(value) click to toggle source
# File lib/monadist/identity.rb, line 20
def self.unit(value)
  new value
end

Public Instance Methods

bind(&block) click to toggle source
# File lib/monadist/identity.rb, line 14
def bind(&block)
  block.call value
end