Sha256: dff68214b9a7735cc53006aab51a7c24e1de8ab6f1abd071141296b5902a534d
Contents?: true
Size: 488 Bytes
Versions: 1
Compression:
Stored size: 488 Bytes
Contents
# frozen_string_literal: true require "dry/effects/effect" module Dry module Effects module Effects class Parallel < ::Module Par = Effect.new(type: :parallel, name: :par) Join = Effect.new(type: :parallel, name: :join) def initialize super define_method(:par) { |&block| ::Dry::Effects.yield(Par).(&block) } define_method(:join) { |xs| ::Dry::Effects.yield(Join.payload(xs)) } end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dry-effects-0.2.0 | lib/dry/effects/effects/parallel.rb |