@@ -212,11 +212,7 @@ private HFoldr(final F3<G, V, L, R> foldRight) {
212212 * @return a fold instance for the empty list.
213213 */
214214 public static <G , V > HFoldr <G , V , HNil , V > hFoldr () {
215- return new HFoldr <G , V , HNil , V >(new F3 <G , V , HNil , V >() {
216- public V f (final G f , final V v , final HNil hNil ) {
217- return v ;
218- }
219- });
215+ return new HFoldr <G , V , HNil , V >((f , v , hNil ) -> v );
220216 }
221217
222218 /**
@@ -238,11 +234,7 @@ public V f(final G f, final V v, final HNil hNil) {
238234 H extends HFoldr <G , V , L , R >,
239235 PP extends Apply <G , P2 <E , R >, RR >>
240236 HFoldr <G , V , HCons <E , L >, RR > hFoldr (final PP p , final H h ) {
241- return new HFoldr <G , V , HCons <E , L >, RR >(new F3 <G , V , HCons <E , L >, RR >() {
242- public RR f (final G f , final V v , final HCons <E , L > c ) {
243- return p .apply (f , P .p (c .head (), h .foldRight (f , v , c .tail ())));
244- }
245- });
237+ return new HFoldr <G , V , HCons <E , L >, RR >((f , v , c ) -> p .apply (f , P .p (c .head (), h .foldRight (f , v , c .tail ()))));
246238 }
247239
248240 /**
0 commit comments