# Collection Operations

Published articles for Collection Operations.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Lambda-powered functions land in OTTL

DevFeed: [Lambda-powered functions land in OTTL](<https://devfeed.tech/articles/lambda-powered-functions-land-in-ottl-32577.md>)

Original publisher: [Read original article](<https://opentelemetry.io/blog/2026/lambda-powered-function-land-in-ottl/>)

Author: OpenTelemetry Authors; Docs CC BY

Published: 2026-07-22T20:04:49Z

Content type: release

Language: en

Sources: [Blog on OpenTelemetry](<https://devfeed.tech/sources/blog-on-opentelemetry.md>)

Topics: [OpenTelemetry](<https://devfeed.tech/topics/opentelemetry.md>), [telemetry](<https://devfeed.tech/topics/telemetry.md>), [sensitive data](<https://devfeed.tech/topics/sensitive-data.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [collection-operations](<https://devfeed.tech/tags/collection-operations.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [functions](<https://devfeed.tech/tags/functions.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [opentelemetry](<https://devfeed.tech/tags/opentelemetry.md>), [pipelines](<https://devfeed.tech/tags/pipelines.md>), [release](<https://devfeed.tech/tags/release.md>), [sensitive-data](<https://devfeed.tech/tags/sensitive-data.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>), [transformation](<https://devfeed.tech/tags/transformation.md>)

### AI overview

OpenTelemetry Collector Contrib v0.157.0 introduces lambda expressions to OTTL, enabling reusable inline logic in generic higher-order functions. The release adds eight experimental functions for collection transformations, including filtering, mapping, finding, reducing, and conditional operations.

### Source excerpt

As telemetry pipelines become more sophisticated, so do the transformations they need to perform: sanitizing sensitive data, normalizing inconsistent schemas, and enforcing attribute contracts. While OTTL provides a rich set of transformation functions, expressing collection operations has required dedicated functions with hardcoded behavior for each new use case. OpenTelemetry Collector Contrib v0.157.0 changes that by introducing lambda expressions to OTTL. Lambdas let users pass inline logic directly to generic higher-order functions, making complex collection transformations both reusable and concise. The release includes eight new functions that leverage this capability: Filter, MapEach, MapKeys, Any, All, Find, Reduce, and When.

## Collections: Lists and Sets

DevFeed: [Collections: Lists and Sets](<https://devfeed.tech/articles/collections-lists-and-sets-25049.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-collections/>)

Author: author@typealias.com (Dave Leeds)

Published: 2022-04-18T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [collection-operations](<https://devfeed.tech/tags/collection-operations.md>), [collections](<https://devfeed.tech/tags/collections.md>), [filter](<https://devfeed.tech/tags/filter.md>), [foreach](<https://devfeed.tech/tags/foreach.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [learning](<https://devfeed.tech/tags/learning.md>), [list](<https://devfeed.tech/tags/list.md>), [map](<https://devfeed.tech/tags/map.md>), [programming](<https://devfeed.tech/tags/programming.md>), [set](<https://devfeed.tech/tags/set.md>)

### AI overview

A Kotlin tutorial introduces collections by explaining how to group values and begins demonstrating lists and sets through a book-list example.

### Source excerpt

So far, we've only worked with variables as individual values. Writing Kotlin becomes so much more interesting once we start putting values together in such a way that we can work with them as a collection. To learn about collections, let's visit Libby, a bright young lady who's always got a book nearby! Let's put things together! Libby is a voracious reader. She's always on the lookout for a great novel, so whenever someone tells her about a good book, she jots down the title on a list that she keeps on a sheet of paper.

## Beware of the order of operands in some Kotlin Collection operations

DevFeed: [Beware of the order of operands in some Kotlin Collection operations](<https://devfeed.tech/articles/beware-of-the-order-of-operands-in-some-kotlin-collection-operations-37159.md>)

Original publisher: [Read original article](<https://arkadiuszchmura.com/posts/beware-of-the-order-of-operands-in-some-kotlin-collection-operations/>)

Published: 2022-02-01T00:00:00Z

Content type: article

Language: en

Sources: [Arkadiusz Chmura](<https://devfeed.tech/sources/arkadiusz-chmura.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [optimize](<https://devfeed.tech/topics/optimize.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>)

Tags: [collection-operations](<https://devfeed.tech/tags/collection-operations.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [optimize](<https://devfeed.tech/tags/optimize.md>), [performance](<https://devfeed.tech/tags/performance.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>)

### AI overview

This article investigates why reversing the operands in some Kotlin collection operations can produce substantially different execution times. It finds that the difference is caused by the type of the second operand, particularly when it is not a Set, and that the issue applies from Kotlin 1.6 onward.

### Source excerpt

The order of operands can drastically affect the performance of your code.

## Inside Sequences: Create Your Own Sequence Operations

DevFeed: [Inside Sequences: Create Your Own Sequence Operations](<https://devfeed.tech/articles/inside-sequences-create-your-own-sequence-operations-25038.md>)

Original publisher: [Read original article](<https://typealias.com/guides/inside-kotlin-sequences/>)

Author: author@typealias.com (Dave Leeds)

Published: 2019-07-23T05:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [collection-operations](<https://devfeed.tech/tags/collection-operations.md>), [collections](<https://devfeed.tech/tags/collections.md>), [data](<https://devfeed.tech/tags/data.md>), [guide](<https://devfeed.tech/tags/guide.md>), [intermediate](<https://devfeed.tech/tags/intermediate.md>), [iterable](<https://devfeed.tech/tags/iterable.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [sequences](<https://devfeed.tech/tags/sequences.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

### AI overview

A tutorial that examines how Kotlin sequences process collection elements and explains their relationship to iterables and iterators. It also demonstrates how to create a custom sequence class and use it in an operation chain.

### Source excerpt

Sequences are a fantastic way to process collections of data in a way that can perform better than the standard collection operations, as we saw in the previous article, Kotlin Sequences: An Illustrated Guide. Today, we're going even deeper! We're going to look under the hood - inside Kotlin sequences - in order to understand how they work like never before! In fact, by the end of this article, we'll even create our very own Sequence class and plug it into an operation chain!

## Kotlin Sequences: An Illustrated Guide

DevFeed: [Kotlin Sequences: An Illustrated Guide](<https://devfeed.tech/articles/kotlin-sequences-an-illustrated-guide-25041.md>)

Original publisher: [Read original article](<https://typealias.com/guides/kotlin-sequences-illustrated-guide/>)

Author: author@typealias.com (Dave Leeds)

Published: 2019-03-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [coding](<https://devfeed.tech/tags/coding.md>), [collection-operations](<https://devfeed.tech/tags/collection-operations.md>), [collections](<https://devfeed.tech/tags/collections.md>), [data](<https://devfeed.tech/tags/data.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [guide](<https://devfeed.tech/tags/guide.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

### AI overview

This illustrated Kotlin guide explains how sequences differ from normal collections through a crayon-factory analogy. It introduces a five-step collection-processing workflow involving filtering, labeling, taking the first five items, and collecting the results, then models the process in Kotlin.

### Source excerpt

You've probably come across Kotlin's sequences at one time or another. Maybe you've heard that they can process data more efficiently than normal collections. But have you ever wondered exactly what they do, how they achieve the efficiency, or when you should use them? In this article series, we're going to cover just about everything there is to know about them! In this article, we'll walk through a story that will help us visualize the difference between sequences and normal collections.

## Functional Android (II): Collection operations in Kotlin

DevFeed: [Functional Android (II): Collection operations in Kotlin](<https://devfeed.tech/articles/functional-android-ii-collection-operations-in-kotlin-27146.md>)

Original publisher: [Read original article](<https://antonioleiva.com/collection-operations-kotlin>)

Published: 2015-09-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Antonio Leiva](<https://devfeed.tech/sources/antonio-leiva.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [collection](<https://devfeed.tech/tags/collection.md>), [collection-operations](<https://devfeed.tech/tags/collection-operations.md>), [collections](<https://devfeed.tech/tags/collections.md>), [functional](<https://devfeed.tech/tags/functional.md>), [iterable](<https://devfeed.tech/tags/iterable.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [language](<https://devfeed.tech/tags/language.md>), [list](<https://devfeed.tech/tags/list.md>), [set](<https://devfeed.tech/tags/set.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

### AI overview

This tutorial explains Kotlin collection types and the functional operations available for working with them. It covers interfaces and mutable variants including Iterable, Collection, List, Set, and Map, with examples intended to help developers choose appropriate collection operations.

### Source excerpt

Everything Android, Kotlin and other random topics