Back to Lo

Core First

docs/data/core-first.md

1.53.0131 B
Original Source

Returns the first element of a collection and whether it exists.

go
v, ok := lo.First([]int{1, 2, 3})
// v == 1, ok == true