reject(fn!isnull, {null(), null(), null()}) --> error
reject(fn!isnull, {null(), null(), null()})
Is this expected or it is a bug?
Discussion posts and replies are publicly visible
reject() and the other looping functions are legacy, and don't handle corner cases very well. Almost all of them can be safely replaced by a!forEach() (sometimes wrapped in a!flatten()). FWIW, the only legacy function I know of which can't be replaced thus, is reduce().
a!flatten(a!forEach(local!myList, if(a!isNullOrEmpty(fv!item), {}, fv!item)))
What error do you get?
It works perfectly fine for me
Yeah, I still get a valid output even if I use OP's exact same original syntax.
I strongly agree with Mike. Ever since I realized that {} does not get returned in output, I have stopped using reject(). Please bear in mind that if you replace {} with anything in the above expression, then it will not be removed.