Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
samber authored Dec 19, 2023
1 parent 3a6fec0 commit e0ddee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ str, index, ok := lo.FindLastIndexOf([]string{"foobar"}, func(i string) bool {

### FindOrElse

Search an element in a slice based on a predicate. It returns element or the fallback value if the element was not found.
Search an element in a slice based on a predicate. It returns the element if found or a given fallback value otherwise.

```go
str := lo.FindOrElse([]string{"a", "b", "c", "d"}, "x", func(i string) bool {
Expand Down

0 comments on commit e0ddee0

Please sign in to comment.