decayFixed function

DecayFn decayFixed(
  1. int minuend
)

Subtracts from by the provided minuend, and deletes the tag when first reaching 0 or negative.

Implementation

DecayFn decayFixed(int minuend) {
  return (value) {
    final v = value.value - minuend;
    return (v, v <= 0);
  };
}