-
Notifications
You must be signed in to change notification settings - Fork 79
Chain<T>.uniq(Function1<T, F>) should return Iterable<T>, not Iterable<F>. #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1 similar comment
8689281
to
d37791d
Compare
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #91 +/- ##
=======================================
Coverage 100% 100%
Complexity 40 40
=======================================
Files 3 3
Lines 52 52
Branches 4 4
=======================================
Hits 52 52
Continue to review full report at Codecov.
|
@SuppressWarnings("unchecked") | ||
public void chain8() { | ||
final List<Comparable> result = $.chain($.chain($.class.getDeclaredMethods()) | ||
.reduce(new FunctionAccum<List<String>, Method>() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Thanks for your improvements!
It may be map() method here instead of reduce().
$.uniq(Function1<T, F>)
returns anIterable<T>
, by usingF
as the uniqueness parameter. However, when usingChain
,Chain.uniq(Function1<T, F>)
returns anIterable<F>
. This PR fixes that and adds a test (inChainingTest
) to validate this behaviour.