createSystemSelector =
  (selector) =>
  (state, ...args) =>
  (system) => {
    const selectedValue = selector(state, system, ...args)
    return typeof selectedValue === "function"
      ? selectedValue(system)
      : selectedValue
  }
Creates selector that provides system as the
second argument. This allows to create memoized
composed selectors from different plugins.

@param selector
@returns {function(*, ...[*]): function(*): *}