diff --git a/README.md b/README.md index cbd892d..00345e5 100644 --- a/README.md +++ b/README.md @@ -549,6 +549,11 @@ map( function() { } ); ``` +**See also:** + +* [rekey()](#rekey) - Changes the keys according to the passed function +* [transform()](#transform) - Creates new key/value pairs using the passed function and returns a new map for the result + ### __construct() @@ -4144,6 +4149,11 @@ Map::from( ['a' => 2, 'b' => 4] )->rekey( function( $value, $key ) { // ['key-a' => 2, 'key-b' => 4] ``` +**See also:** + +* [map()](#map) - Maps new values to the existing keys using the passed function and returns a new map for the result +* [transform()](#transform) - Creates new key/value pairs using the passed function and returns a new map for the result + ### remove() @@ -5550,6 +5560,11 @@ Map::from( ['la' => 2, 'le' => 4, 'li' => 6] )->transform( function( $value, $ke // ['l' => 12] ``` +**See also:** + +* [map()](#map) - Maps new values to the existing keys using the passed function and returns a new map for the result +* [rekey()](#rekey) - Changes the keys according to the passed function + ### transpose() diff --git a/src/Map.php b/src/Map.php index 7b8dad5..0e4dfdc 100644 --- a/src/Map.php +++ b/src/Map.php @@ -2853,6 +2853,8 @@ public function ltrim( string $chars = " \n\r\t\v\x00" ) : self * * @param callable $callback Function with (value, key) parameters and returns computed result * @return self New map with the original keys and the computed values + * @see rekey() - Changes the keys according to the passed function + * @see transform() - Creates new key/value pairs using the passed function and returns a new map for the result */ public function map( callable $callback ) : self { @@ -3653,6 +3655,8 @@ public function reject( $callback = true ) : self * * @param callable $callback Function with (value, key) parameters and returns new key * @return self New map with new keys and original values + * @see map() - Maps new values to the existing keys using the passed function and returns a new map for the result + * @see transform() - Creates new key/value pairs using the passed function and returns a new map for the result */ public function rekey( callable $callback ) : self { @@ -5029,6 +5033,8 @@ public function toUrl() : string * * @param \Closure $callback Function with (value, key) parameters and returns an array of new key/value pair(s) * @return self New map with the new key/value pairs + * @see map() - Maps new values to the existing keys using the passed function and returns a new map for the result + * @see rekey() - Changes the keys according to the passed function */ public function transform( \Closure $callback ) : self {