void (String[] args) { NaturalTransformation<Integer, NatF<Integer>, NatF<Integer>> happy = natF -> natF.match(identity(), s -> NatF.s(s.carrier() + 1)); //no problems // compiler exception reported on the following line NaturalTransformation<Integer, NatF<Integer>, NatF<Integer>> unhappy = NaturalTransformation.endo(natF -> natF.match(identity(), s -> NatF.s(s.carrier() + 1))); }