Sha256: 320d0f2f82cf19f38ead5273fb1e65a38227d48f5cfa868fbffebc0333141367
Contents?: true
Size: 288 Bytes
Versions: 4
Compression:
Stored size: 288 Bytes
Contents
class Datapipes module Composable attr_accessor :accumulated def +(op2) op1 = self op1_acc = (op1.accumulated || [op1]) op2_acc = (op2.accumulated || [op2]) self.class.new.tap do |o| o.accumulated = op1_acc + op2_acc end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
datapipes-0.1.3 | lib/datapipes/composable.rb |
datapipes-0.1.2 | lib/datapipes/composable.rb |
datapipes-0.1.1 | lib/datapipes/composable.rb |
datapipes-0.1.0 | lib/datapipes/composable.rb |