You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Unify every "maybe no result" terminal on Optional, replacing the
(value, bool) / (int, bool) / (key, value, bool) returns. This is a
breaking change, made now while the library has no downstream importers.
- Seq: Find, FindLast, First, Last, Nth, Reduce, MaxBy, MinBy,
MaxByKey, MinByKey -> Optional[T]
FindIndex, FindLastIndex -> Optional[int]
- free: Max, Min -> Optional[T]; IndexOf, LastIndexOf -> Optional[int]
- subtypes: SeqOrdered/SeqNumeric Max/Min/IndexOf, SeqComparable.IndexOf
- Seq2.Find -> Optional[Pair[K, V]] (key/value wrapped in the existing Pair)
Optional.Get() (T, bool) is retained as the bridge back to Go's idiomatic
pair; ToOptional(v, ok) bridges the other way. Pure-bool predicates
(Any/All/None/Contains/Equal/IsEmpty) and the FilterMap callback signature
func(T)(U,bool) are deliberately untouched.
Docs (README, README_CN, docs/index.html) updated to the new signatures
and chaining examples. Also adds docs/index.html (full API reference) and
removes the stale docs/issue#0001.html–0010.html scratch files.
Closes #36
Closes #37
Closes #38
Closes #39
Closes #40
Closes #41
Co-authored-by: chaoyuepan <chaoyuepan@baidu.com>