Skip to content

Accumulation Tail

Returns the tail of an accumulation by removing its first element. If the accumulation has zero or one element, it returns an empty accumulation. The node is defensive: on invalid inputs or errors, it yields an empty accumulation.
Preview

Usage

Use this node when processing a sequence stored in an accumulation and you need everything except the first element (e.g., iterative processing, recursion, or stepping through a queue-like structure). Typically paired with Accumulation Head/Accumulate/To List nodes for list-style workflows.

Inputs

FieldRequiredTypeDescriptionExample
accumulationTrueACCUMULATIONAn accumulation object containing a list under the key 'accum'.{'accum': [10, 20, 30]}

Outputs

FieldTypeDescriptionExample
tailWILDCARDThe tail of the input accumulation (an accumulation object with all elements except the first). If the input has <= 1 elements or is invalid, returns an empty accumulation.{'accum': [20, 30]}

Important Notes

  • If the input accumulation is empty or has a single element, the output is an empty accumulation: {"accum": []}.
  • If the input is not a valid accumulation object, the node returns an empty accumulation.
  • Downstream nodes should expect an accumulation-like object on the output, even though the declared output type is WILDCARD.

Troubleshooting

  • Output is empty unexpectedly: Ensure the input is a proper accumulation object shaped like {"accum": [...]}, and that it contains at least two elements.
  • Downstream type mismatch: Some nodes may expect an ACCUMULATION type explicitly; insert a conversion or ensure the receiving node can accept the output as an accumulation.
  • Errors in logs and empty output: Validate that the input is not None and follows the expected structure {"accum": list}.