View Source Jido.Actions.Calculator (Jido v1.0.0)
Provides basic calculator operations as actions. The operations defined here are obviously trivial. This module is intended to be used as a reference for how to write your own actions.
This module defines a set of calculator actions that can be used in workflows:
- Add: Adds two numbers together
- Subtract: Subtracts one number from another
- Multiply: Multiplies two numbers
- Divide: Divides one number by another, handling division by zero
- Square: Squares a number
Each action is implemented as a separate submodule and follows the Jido.Action behavior.