View Source Funx.Monad.Either.Dsl.Step.ProtocolFunction (funx v0.3.0)

Represents a call to a Funx protocol function.

Protocol functions are operations implemented via Elixir protocols rather than module functions. This allows the operation to work polymorphically across different types while maintaining a clean API.

Examples:

  • tap (Funx.Tappable) - Execute side effects without changing the value

Summary

Types

t()

A step calling a protocol function.

Types

@type t() :: %Funx.Monad.Either.Dsl.Step.ProtocolFunction{
  __meta__: map() | nil,
  args: list(),
  function: atom(),
  protocol: module()
}

A step calling a protocol function.

The protocol module (e.g., Funx.Tappable) is stored explicitly so the executor can dispatch to the correct protocol implementation.