@@ -91,11 +91,7 @@ public C append(final A a, final B b) {
9191 * @return a method for concatenating lists to the empty list.
9292 */
9393 public static <L extends HList <L >> HAppend <HNil , L , L > append () {
94- return new HAppend <HNil , L , L >(new F2 <HNil , L , L >() {
95- public L f (final HNil hNil , final L l ) {
96- return l ;
97- }
98- });
94+ return new HAppend <HNil , L , L >((hNil , l ) -> l );
9995 }
10096
10197 /**
@@ -106,11 +102,7 @@ public L f(final HNil hNil, final L l) {
106102 */
107103 public static <X , A extends HList <A >, B , C extends HList <C >, H extends HAppend <A , B , C >>
108104 HAppend <HCons <X , A >, B , HCons <X , C >> append (final H h ) {
109- return new HAppend <HCons <X , A >, B , HCons <X , C >>(new F2 <HCons <X , A >, B , HCons <X , C >>() {
110- public HCons <X , C > f (final HCons <X , A > c , final B l ) {
111- return cons (c .head (), h .append (c .tail (), l ));
112- }
113- });
105+ return new HAppend <HCons <X , A >, B , HCons <X , C >>((c , l ) -> cons (c .head (), h .append (c .tail (), l )));
114106 }
115107 }
116108
0 commit comments