Skip to content

Accumulation Tail

Returns the tail of an accumulation by removing the first element. If the accumulation has zero or one items, it returns an empty accumulation. It preserves the accumulation structure expected by other list/accumulation nodes.
Preview

Usage

Use this node when you need to iterate through or process an accumulation by progressively dropping the head element. Commonly chained after an accumulation-producing node and before further list operations (e.g., length checks, get/set item, or converting back to a plain list).

Inputs

FieldRequiredTypeDescriptionExample
accumulationTrueACCUMULATIONAn accumulation object containing a list under the 'accum' key. The head (first item) will be removed.{"accum": ["a", "b", "c"]}

Outputs

FieldTypeDescriptionExample
tailWILDCARDThe accumulation with its first element removed. If fewer than two elements exist, returns an empty accumulation.{"accum": ["b", "c"]}

Important Notes

  • If the input is not a valid accumulation or lacks the 'accum' key, the node returns an empty accumulation: {"accum": []}.
  • If the input accumulation has length 0 or 1, the result is {"accum": []}.
  • The declared output type is WILDCARD, but the actual structure returned is an accumulation-like object with an 'accum' list. Ensure downstream nodes expect an accumulation.
  • This node does not mutate the input; it returns a new accumulation object.

Troubleshooting

  • Output is empty unexpectedly: Verify the input is a proper accumulation object with an 'accum' list and that it contains at least two items.
  • Downstream type mismatch: Some nodes may expect an ACCUMULATION type explicitly. If needed, confirm compatibility or convert using related nodes.
  • Need a plain list: If you require a native list, pass the output to 'Accumulation to List' to extract the list from the accumulation.