Sha256: 149e4e00fad810424388c2400a626c2d1d978b8c5ec624a1a715728aebbe90eb

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

require 'datapipes'

$:.unshift File.expand_path('../lib', __FILE__)
require 'list'
require 'long_task'
require 'mul'
require 'triple'
require 'acc'
require 'reverse_acc'

acc = Acc.new
rev_acc = ReverseAcc.new

source = List.new + LongTask.new(21..30)
tube = Mul.new >> Triple.new
sink = acc + rev_acc

datapipe = Datapipes.new(
  source: source,
  sink: sink,
  tube: tube
)

datapipe.run_resource

p acc.stock
p rev_acc.stock

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datapipes-0.1.5 examples/composing.rb