Results for “Array traversal & selection”
Small, practical examples. Search by task or narrow things down below.
Keep both matching and rejected values
JavaScript: Use two explicit outputs when a caller needs both sides of a classification.
JavaScript✓ Tested
Keep both matching and rejected values
TypeScript: Use two explicit outputs when a caller needs both sides of a classification.
TypeScript✓ Tested
List all files stored in a commit
Git: ls-tree inspects the committed tree without relying on working files.
Git✓ Tested
List files changed by the current commit
Git: diff-tree exposes the paths changed between a commit and its parent.
Git✓ Tested
Map items to multiple output values
JavaScript: flatMap combines mapping and a one-level flattening operation.
JavaScript✓ Tested
Map items to multiple output values
TypeScript: flatMap combines mapping and a one-level flattening operation.
TypeScript✓ Tested
Read a complete commit message
Git: The B placeholder includes the subject and body without extra metadata.
Git✓ Tested
Read a file from the parent commit
Git: HEAD~1 names the first parent one generation before HEAD.
Git✓ Tested
Read a page after a known unique key
SQL: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.
SQL✓ Tested
Read a page after a known unique key
SQL Server: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.
SQL Server✓ Tested
Read a page after a known unique key
Postgres: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.
Postgres✓ Tested
Read a page after a known unique key
SQLite: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.
SQLite✓ Tested