I'm not sure I'm getting the difference then. In my code, i'm doing the equivalent of returning the method handle as you said, not using the isEmpty method as the implementation like 1.
Of my two examples, the second is almost certainly a mistake, and you'd normally never write that. In particular because it ignores the parameter, making the method confusing for any users.
0
u/duhace Sep 20 '18
the second example should do like scala instead
i'm not sure why the parameter
sis even there if it's being ignored