FIND YOUR NEXT FEW LINES

Results for “Iterators & transformations”

Small, practical examples. Search by task or narrow things down below.

40 snippets foundClear filters
RustIterators & transformations

Accumulate a result with fold

Accumulate a result with fold in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Find the first matching value

Find the first matching value in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Flatten nested collections

Flatten nested collections in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Number items while iterating

Number items while iterating in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Pair corresponding values

Pair corresponding values in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Parse only valid integers

Parse only valid integers in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Partition values into two collections

Partition values into two collections in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Read values until a condition changes

Read values until a condition changes in a complete Rust program using the standard library.

Rust✓ Tested
RustIterators & transformations

Transform each value with map

Transform each value with map in a complete Rust program using the standard library.

Rust✓ Tested
CArray transformations

Calculate a cumulative sum for each position

C: Keep a running total and store each prefix result in a separate output array.

C✓ Tested
C#LINQ transformations

Calculate a product with Aggregate

C#: Supply a seed to define the result for an empty sequence.

C#✓ Tested
JavaStream transformations

Calculate several numeric stream statistics

Java: Use summaryStatistics to calculate count, sum, minimum, maximum, and average in one pass.

Java✓ Tested