src/Middleware.php
public static function mapResult(callable $f)
    {
        return function (callable $handler) use ($f) {
            return function (
                CommandInterface $command,
                RequestInterface $request = null
            ) use ($handler, $f) {
                return $handler($command, $request)->then($f);
            };
        };
    }
public static function mapResult(callable $f)
    {
        return function (callable $handler) use ($f) {
            return function (
                CommandInterface $command,
                RequestInterface $request = null
            ) use ($handler, $f) {
                return $handler($command, $request)->then($f);
            };
        };
    }
public static function mapResult ( callable $ f ) { return function ( callable $ handler ) use ( $ f ) { return function ( CommandInterface $ command , RequestInterface $ request = null ) use ( $ handler , $ f ) { return $ handler ( $ command , $ request ) -> then ( $ f ) ; } ; } ; }
Creates a middleware that applies a map function to results.

@param callable $f Map function that accepts an Aws\ResultInterface and
returns an Aws\ResultInterface.

@return callable
Creates a middleware that applies a map function to results .