First item
Returns the first element of a non-empty collection while preserving its concrete type.
Typed collection
First item
Collection
Typed result
Vue d’ensemble
Returns the first element of a non-empty collection while preserving its concrete type.
Exemple
After explicit sorting, retrieve the highest-priority case without requiring the collection to contain exactly one element.
Parameters 1
items
Typed collection supplied by a binding. The concrete element type is preserved or unified in outputs.
Outputs 1
item
First element of the collection, with its concrete type.
Behavior
The node takes the element at index 0. An empty collection causes the node to fail.
Key point Collection operations preserve the data classification carried by their elements; filtering, sorting, or concatenating a list is not declassification.
Limits and responsibilities
- The node does not sort the collection: the meaning of “first” depends entirely on input order.
- If uniqueness matters, use
exactly_oneinstead.