class CountFunction extends BaseFEELFunction {

    public FEELFnResult<BigDecimal> invoke(@ParameterName( "list" ) List list) {
        if ( list == null ) {
            return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "list", "cannot be null"));
        }
        
        return FEELFnResult.ofResult( BigDecimal.valueOf( list.size() ) );
    }

    public  CountFunction();

}