name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
| name |
slug |
sourceRef |
category |
subCategory |
playUrl |
variantHelpers |
similarHelpers |
position |
signatures |
| NthOr |
nthor |
find.go#L635 |
core |
find |
https://go.dev/play/p/sHoh88KWt6B |
|
| core#find#nthorempty |
| core#find#nth |
| core#find#findorelse |
| core#find#firstor |
|
330 |
| func NthOr[T any, N constraints.Integer](collection []T, nth N, fallback T) T |
|
Returns the element at index nth of collection, or the fallback if out of bounds. If nth is negative, returns the nth element from the end.