FIND YOUR NEXT FEW LINES

Results for “transform”

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

72 snippets foundClear filters
RustErrors & optional values

Transform an optional value

Transform an optional value in a complete Rust program using the standard library.

Rust✓ Tested
JavaScriptArrays

Transform array values

Use map to create a JavaScript array of squared values.

JavaScript✓ Tested
PowerShellFunctions & control

Transform each item in a collection

Build a result array with a foreach expression.

foreach✓ Tested
C#LINQ transformations

Transform each item with Select

C#: Project each input value into a new value without modifying the source array.

C#✓ Tested
PowerShellGetting Started

Transform each pipeline value

PowerShell: Transform each pipeline value using PowerShell 7.

PowerShell✓ Tested
JavaScriptText handling & Unicode

Transform each regex match with a callback

JavaScript: A replacement callback computes the replacement separately for each match.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Transform each regex match with a callback

TypeScript: A replacement callback computes the replacement separately for each match.

TypeScript✓ Tested
JavaStream transformations

Transform each stream value

Java: Use map to turn each input into a corresponding output.

Java✓ Tested
RustIterators & transformations

Transform each value with map

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

Rust✓ Tested
RustIterators & transformations

Accumulate a result with fold

Accumulate a result with fold 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