def [](*args)
      if args.size.equal?(1)
        command = super
        mapper = options[:mapper]

        if mapper
          command.curry >> mapper
        else
          command
        end
      else
        cache.fetch_or_store(args.hash) { compiler.(*args) }
      end
    end
def [](*args)
      if args.size.equal?(1)
        command = super
        mapper = options[:mapper]

        if mapper
          command.curry >> mapper
        else
          command
        end
      else
        cache.fetch_or_store(args.hash) { compiler.(*args) }
      end
    end
Return a command from the registry

 If mapper is set command will be turned into a composite command with
 auto-mapping

 @overload [](name)
   @param [Symbol] name The command identifier from the registry
   @example
     create_user = rom.commands[:users][:create]
     create_user[name: 'Jane']

     # with mapping, assuming :entity mapper is registered for :users relation
     create_user = rom.commands[:users].map_with(:entity)[:create]
     create_user[name: 'Jane'] # => result is sent through :entity mapper

 @overload [](*args)
   @param [Array] *args {CommandCompiler} arguments
   @see CommandCompiler#call

 @return [Command,Command::Composite]

 @api public