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
The foldLeft and foldRight methods in the �either.dart have identical comments, which can be misleading because these methods perform different operations.
Current Documentation
/// Return the result of `f` called with `b` and the value of [Right]./// If this [Either] is [Left], return `b`.@OverrideCfoldRight<C>(C b, CFunction(C acc, R b) f);
/// Return the result of `f` called with `b` and the value of [Right]./// If this [Either] is [Left], return `b`.@OverrideCfoldLeft<C>(C b, CFunction(C acc, R b) f) =>foldMap<Endo<C>>(dualEndoMonoid(), (b) => (C c) =>f(c, b))(b);
Issue
The comments for foldLeft and foldRight are identical, even though these methods should have different descriptions because they perform different operations:
foldLeft: Folds the elements from left to right.
foldRight: Folds the elements from right to left.
Suggested Documentation
To avoid confusion, the comments should reflect the distinct behaviors of these methods.
/// This method folds the value from right to left./// /// Return the result of `f` called with `b` and the value of [Right]./// If this [Either] is [Left], return `b`.@OverrideCfoldRight<C>(C b, CFunction(C acc, R b) f);
/// This method folds the value from left to right.////// Return the result of `f` called with `b` and the value of [Right]./// If this [Either] is [Left], return `b`.@OverrideCfoldLeft<C>(C b, CFunction(C acc, R b) f) =>foldMap<Endo<C>>(dualEndoMonoid(), (b) => (C c) =>f(c, b))(b);
Thanks for your attention to this issue and for your continuous efforts. I always appreciate using this library!
The text was updated successfully, but these errors were encountered:
Description
The
foldLeft
andfoldRight
methods in the�either.dart
have identical comments, which can be misleading because these methods perform different operations.Current Documentation
Issue
The comments for foldLeft and foldRight are identical, even though these methods should have different descriptions because they perform different operations:
foldLeft: Folds the elements from left to right.
foldRight: Folds the elements from right to left.
Suggested Documentation
To avoid confusion, the comments should reflect the distinct behaviors of these methods.
Thanks for your attention to this issue and for your continuous efforts. I always appreciate using this library!
The text was updated successfully, but these errors were encountered: