mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
feat:addFindLast for stream (#95)
Co-authored-by: sunyaoyao <sunyaoyao@kezaihui.com>
This commit is contained in:
1 parent
aa8e0d5c12
commit
1616d3d1be
3 files changed
+43
No files matched your search
@@ -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})
|
||||
|
||||
|
||||
Reference in new issue
Block a user