Take last

library operator
ID: 3fb28704-266d-4339-8cc7-8630436aab93
Emits last item of a stream of generic items.


Test data showing the behavior of Take last


It emits the last item of a stream of strings.

Input Output
["f","a","c"] "c"
["a"] "a"
Empty value null

It emits null for empty streams.

Input Output
[] null
Complex items

It emits the last item of a stream of complex items.

Input Output
[{"a":1,"b":"a"},{"a":2... {"a":3,"b":"c"}


The implementation of Take last makes use of the following 2 operators.

Emits a constant value for each item.
Uses an iterator delegate to aggregate items of a stream.

Used in

The Take last operator is used by 1 operators.

Emits the z-score for each number of a stream of numbers.