Sha256: 3880837a3b6e7aa6232cf26c196c94fb430730222e6d2eeb2a0c0a9495b19086
Contents?: true
Size: 504 Bytes
Versions: 13
Compression:
Stored size: 504 Bytes
Contents
require 'funkr/categories' module Funkr module Types class Container include Funkr::Categories def initialize(value) @value = value end def unbox; @value; end def to_s; format("{- %s -}", @value.to_s); end include Functor def map(&block) self.class.new(yield(@value)) end include Monoid extend Monoid::ClassMethods def mplus(c_y) self.class.new(@value.mplus(c_y.unbox)) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems