@@ -227,31 +227,8 @@ public static SerializableFunction<FunctionName, Pair<FunctionSignature, Functio
227227 ExprType args1Type ,
228228 ExprType args2Type ) {
229229
230- return functionName -> {
231- FunctionSignature functionSignature =
232- new FunctionSignature (functionName , Arrays .asList (args1Type , args2Type ));
233- FunctionBuilder functionBuilder =
234- (functionProperties , arguments ) -> new FunctionExpression (functionName , arguments ) {
235- @ Override
236- public ExprValue valueOf (Environment <Expression , ExprValue > valueEnv ) {
237- ExprValue arg1 = arguments .get (0 ).valueOf (valueEnv );
238- ExprValue arg2 = arguments .get (1 ).valueOf (valueEnv );
239- return function .apply (arg1 , arg2 );
240- }
241-
242- @ Override
243- public ExprType type () {
244- return returnType ;
245- }
246-
247- @ Override
248- public String toString () {
249- return String .format ("%s(%s, %s)" , functionName , arguments .get (0 ).toString (),
250- arguments .get (1 ).toString ());
251- }
252- };
253- return Pair .of (functionSignature , functionBuilder );
254- };
230+ return implWithProperties ((fp , arg1 , arg2 ) ->
231+ function .apply (arg1 , arg2 ), returnType , args1Type , args2Type );
255232 }
256233
257234 /**
0 commit comments