I find out that optionals definitions lookup was made by combination of filter + isEmpty.
The problem with that approach is that it's iterate definitions until the end even when the target elements stored at the begin.
This behavior can be optimized using the contains operator.
I find out that optionals definitions lookup was made by combination of
filter
+isEmpty
. The problem with that approach is that it's iterate definitions until the end even when the target elements stored at the begin. This behavior can be optimized using thecontains
operator.