Sha256: 6b7742e5bdf6a9ab5e3c0f48a5ee21aa36e3862c2a6dbea7d30d191cb256281c

Contents?: true

Size: 361 Bytes

Versions: 21

Compression:

Stored size: 361 Bytes

Contents

module Funkr
  module Categories
    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

21 entries across 21 versions & 1 rubygems

Version Path
funkr-0.0.23 lib/funkr/categories/monoid.rb
funkr-0.0.22 lib/funkr/categories/monoid.rb
funkr-0.0.21 lib/funkr/categories/monoid.rb
funkr-0.0.20 lib/funkr/categories/monoid.rb
funkr-0.0.19 lib/funkr/categories/monoid.rb
funkr-0.0.18 lib/funkr/categories/monoid.rb
funkr-0.0.17 lib/funkr/categories/monoid.rb
funkr-0.0.16 lib/funkr/categories/monoid.rb
funkr-0.0.15 lib/funkr/categories/monoid.rb
funkr-0.0.14 lib/funkr/categories/monoid.rb
funkr-0.0.12 lib/funkr/categories/monoid.rb
funkr-0.0.11 lib/funkr/categories/monoid.rb
funkr-0.0.10 lib/funkr/categories/monoid.rb
funkr-0.0.9 lib/funkr/categories/monoid.rb
funkr-0.0.8 lib/funkr/categories/monoid.rb
funkr-0.0.7 lib/funkr/categories/monoid.rb
funkr-0.0.6 lib/funkr/categories/monoid.rb
funkr-0.0.5 lib/funkr/categories/monoid.rb
funkr-0.0.4 lib/funkr/categories/monoid.rb
funkr-0.0.3 lib/funkr/categories/monoid.rb