Code/SboxSuperuser/Core/Effects/EffectFunction.cs

Defines a small record type for a built-in effect function in the SboxSuperuser effects system. It carries a parameter signature string (one letter per argument: n/c/t/s), the return kind, and the body delegate that runs once arguments are validated.

namespace SboxSuperuser.Core.Effects;

/// <summary>
/// A built-in function. <see cref="Parameters"/> has one letter per parameter: n number, c color, t text,
/// s text or list. Arguments are checked against it before <see cref="Body"/> runs.
/// </summary>
internal sealed record EffectFunction( string Parameters, EffectValueKind Returns, Func<EffectValue[], EffectValue> Body );