camunda / feel-scala

FEEL parser and interpreter written in Scala
https://camunda.github.io/feel-scala/
Apache License 2.0
119 stars 46 forks source link

Add function to check if a list is empty #805

Closed saig0 closed 1 month ago

saig0 commented 4 months ago

Is your feature request related to a problem? Please describe. Currently, there is no function to check if a list is empty. The only way is to use the count() function. It works but it is not very (business) friendly.

count(myList) = 0

Describe the solution you'd like Add a new function to check if a list is empty.

// function signature
is empty(list: List<Any>): Boolean

// examples
is empty([])     // --> true
is empty([1])   // --> false

Related issues