Normandy.Tools.Examples.ListProcessor (normandy v0.6.0)

View Source

A tool for processing lists with various operations.

Examples

iex> tool = %Normandy.Tools.Examples.ListProcessor{operation: "sum", numbers: [1, 2, 3, 4, 5]}
iex> Normandy.Tools.BaseTool.run(tool)
{:ok, 15}

iex> tool = %Normandy.Tools.Examples.ListProcessor{operation: "average", numbers: [10, 20, 30]}
iex> Normandy.Tools.BaseTool.run(tool)
{:ok, 20.0}

Summary

Types

t()

@type t() :: %Normandy.Tools.Examples.ListProcessor{
  numbers: [number()],
  operation: String.t()
}