AliSoftware / Dip

Simple Swift Dependency container. Use protocols to resolve your dependencies and avoid singletons / sharedInstances!
MIT License
978 stars 75 forks source link

Definitions lookup with lazy operator #243

Open AgranatMarkit opened 2 years ago

AgranatMarkit commented 2 years ago

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.