Sha256: 2cef88a763c36337ceb175e0a687e9c0f394530ded1039c10c3b77da1a43abf5
Contents?: true
Size: 422 Bytes
Versions: 7
Compression:
Stored size: 422 Bytes
Contents
module Funkr module Categories # Monoids are types that can be added and have a zero element. module Monoid def mplus raise "Monoid#mplus not implemented" end module ClassMethods def mzero raise "Monoid#mzero not implemented" end def mconcat(list) list.inject(mzero){|a,e| a.mplus(e)} end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems