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
When grouping sequences typically through a groupBy operation, all subsequences we get are never empty.
This means that using a NonEmptySeq should be more appropriate and it will provide additional compile time guarantees for further operations, typically aggregation operations.
The problem is that these grouping operations are defined in F# core and it's against this library design guidelines to redefine a function coming from F# core, for good reasons.
But we could redefine our grouping functions, for instance chunkBy will never yield an empty group. Here the problem is backwards compatibility and the additional burden incurred in having to eventually upcast to seq for certain operations. But for F# 6 it shouldn't be an issue since it does it automatically.
The text was updated successfully, but these errors were encountered:
When grouping sequences typically through a
groupBy
operation, all subsequences we get are never empty.This means that using a
NonEmptySeq
should be more appropriate and it will provide additional compile time guarantees for further operations, typically aggregation operations.The problem is that these grouping operations are defined in F# core and it's against this library design guidelines to redefine a function coming from F# core, for good reasons.
But we could redefine our grouping functions, for instance
chunkBy
will never yield an empty group. Here the problem is backwards compatibility and the additional burden incurred in having to eventually upcast toseq
for certain operations. But for F# 6 it shouldn't be an issue since it does it automatically.The text was updated successfully, but these errors were encountered: