Cizen v0.12.5 Cizen.Effects.Chain View Source

An effect to chain multiple effects.

Returns the list of resolved values. If an element of the effects list is a function, it called with results of resolved effects, and its result is treated as the next effect.

Example

  [result1, result2, result3, result4] = perform id, %Chain{
    effects: [
      effect1,
      effect2,
      fn result1, result2 -> effect3 end,
      effect4
    ]
  }