Sha256: c79f16e25be2780d1d7eb28be157dfdf6016d27a8acc4024caaa6c4e51502023
Contents?: true
Size: 329 Bytes
Versions: 5
Compression:
Stored size: 329 Bytes
Contents
# frozen_string_literal: true module Zx class Steps include Maybe class << self def step(step) steps << step end def steps @steps ||= [] end end def call list = self.class.steps list.reduce(Some()) { |result, step| result >> send(step) } end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
zx-monads-0.0.5 | lib/zx/steps.rb |
zx-monads-0.0.4 | lib/zx/steps.rb |
zx-monads-0.0.3 | lib/zx/steps.rb |
zx-monads-0.0.2 | lib/zx/steps.rb |
zx-monads-0.0.1 | lib/zx/steps.rb |