In discussion with a group of experienced developers, the use case for
Dry::Container was not obvious. Once we walked through Dry::AutoInject,
it was clearer how this could be used.
[skip ci]
This commits adds a :memoize option to items. A memoized item
initialized with a proc (or block) will call the proc to get the value
only once, and will then reuse the item on further calls.
The main usage of this is allowing a number of dependencies to be
registered in the container without caring about their order (e.g. when
a dependency depends on another), but still reusing the same objects,
avoiding the need to instance them on each call to resolve, as is the
default when not using memoized.
The existing Synopsis is a lot to read and comprehend. The brief
example is there to provide an at a glance answer to the questions:
> Would this be useful for me?
> What does this do?
[skip ci]