Skip to content

acc [terminology]

Terminology

Usage

  • Use for a compact general accumulator when the operation is not best described as a total, count, product, or optimum.
  • It is suitable for operations such as XOR or state folding.
  • Prefer total for addition and prefix or suffix for directional products.
acc = 0

for x in nums:
    acc ^= x