Results for “then”
Small, practical examples. Search by task or narrow things down below.
Transform a deferred value with then
jQuery: then returns a new promise with the callback’s result.
jQuery✓ Tested
Chain operations that may return None
Chain operations that may return None in a complete Rust program using the standard library.
Rust✓ Tested
Accept different types with a generic function
Accept different types with a generic function in a complete Rust program using the standard library.
Rust✓ Tested
Accumulate a result with fold
Accumulate a result with fold in a complete Rust program using the standard library.
Rust✓ Tested
Add and remove values at both ends
C++: Deque supports efficient end operations without requiring contiguous storage.
C++✓ Tested
Add calendar days
Use DateOnly for a date without a time zone in C#.
C#✓ Tested
Add calendar days in UTC
TypeScript: Use UTC date setters to cross month boundaries without local daylight-saving effects.
TypeScript✓ Tested
Add context to a parsing failure
Add context to a parsing failure in a complete Rust program using the standard library.
Rust✓ Tested
Add days to a date
Parse an ISO date and add calendar days using Java LocalDate.
Java✓ Tested
Allocate a zeroed array
Check calloc, use the allocation, and release it in C.
C✓ Tested
Allocate an independent copy of a C string
C: Include one extra byte for the terminating null character.
C✓ Tested
Allocate and free a typed array
C: Use sizeof on the pointed-to type and check allocation success before writing.
C✓ Tested