class ReverseFunction extends BaseFEELFunction {

    public FEELFnResult<List<Object>> invoke(@ParameterName("list") List list) {
        if ( list == null ) {
            return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "list", "cannot be null"));
        }
        // spec requires us to return a new list
        final List<Object> result = new ArrayList<>( list );
        Collections.reverse( result );
        return FEELFnResult.ofResult( result );
    }

    public  ReverseFunction();

}