feat:addFindLast for stream (#95)

Co-authored-by: sunyaoyao <sunyaoyao@kezaihui.com>
This commit is contained in:
willandsunyaoyao authored and GitHub committed 2023-05-18 10:17:15 +08:00
1 parent aa8e0d5c12
commit 1616d3d1be
3 files changed
+43

No files matched your search

+13
View File
@@ -290,6 +290,19 @@ func ExampleStream_FindFirst() {
// true
}
func ExampleStream_FindLast() {
original := FromSlice([]int{3, 2, 1})
result, ok := original.FindLast()
fmt.Println(result)
fmt.Println(ok)
// Output:
// 1
// true
}
func ExampleStream_Reverse() {
original := FromSlice([]int{1, 2, 3})