Jido.Flow.Reduce (Jido Action v3.0.0-beta.12)

View Source

A named Flow fan-in operation over one ordered collection.

A Reduce is one canonical authoring component. It lowers to a native Runic Reduce and FanIn. Its target calls form one serial left fold.

Create it with new/1, the Flow module DSL, map-based definitions, or Jido.Flow.Codec.

Summary

Functions

Builds and validates one canonical Reduce component.

Builds one canonical Reduce component or raises its validation error.

Types

t()

@type t() :: %Jido.Flow.Reduce{
  action: atom(),
  collection: any(),
  initial: any(),
  meta: map(),
  name: binary(),
  needs: [binary()],
  params: any()
}

Functions

new(reduce)

@spec new(map() | keyword() | t()) :: {:ok, t()} | {:error, Exception.t()}

Builds and validates one canonical Reduce component.

new!(attrs)

@spec new!(map() | keyword() | t()) :: t() | no_return()

Builds one canonical Reduce component or raises its validation error.