diff --git a/src/Psl/Dict/map.php b/src/Psl/Dict/map.php index 868f7912..5033b3bb 100644 --- a/src/Psl/Dict/map.php +++ b/src/Psl/Dict/map.php @@ -26,7 +26,7 @@ * @param iterable $iterable Iterable to be mapped over * @param (Closure(Tv): T) $function * - * @return array + * @return ($iterable is non-empty-array ? non-empty-array : array) */ function map(iterable $iterable, Closure $function): array { diff --git a/src/Psl/Dict/map_keys.php b/src/Psl/Dict/map_keys.php index 25cb35a9..1f999179 100644 --- a/src/Psl/Dict/map_keys.php +++ b/src/Psl/Dict/map_keys.php @@ -26,7 +26,7 @@ * @param iterable $iterable Iterable to be mapped over * @param (Closure(Tk1): Tk2) $function * - * @return array + * @return ($iterable is non-empty-array ? non-empty-array : array) */ function map_keys(iterable $iterable, Closure $function): array { diff --git a/src/Psl/Dict/map_with_key.php b/src/Psl/Dict/map_with_key.php index bf756f6c..746c5d36 100644 --- a/src/Psl/Dict/map_with_key.php +++ b/src/Psl/Dict/map_with_key.php @@ -26,7 +26,7 @@ * @param iterable $iterable Iterable to be mapped over * @param (Closure(Tk,Tv): T) $function * - * @return array + * @return ($iterable is non-empty-array ? non-empty-array : array) */ function map_with_key(iterable $iterable, Closure $function): array { diff --git a/src/Psl/Vec/map.php b/src/Psl/Vec/map.php index b9f404b7..d7e2a8f4 100644 --- a/src/Psl/Vec/map.php +++ b/src/Psl/Vec/map.php @@ -28,7 +28,7 @@ * @param iterable $iterable Iterable to be mapped over * @param (Closure(Tv): T) $function * - * @return list + * @return ($iterable is non-empty-array ? non-empty-list : list) */ function map(iterable $iterable, Closure $function): array { diff --git a/src/Psl/Vec/map_with_key.php b/src/Psl/Vec/map_with_key.php index 5f11a095..e4c97780 100644 --- a/src/Psl/Vec/map_with_key.php +++ b/src/Psl/Vec/map_with_key.php @@ -24,7 +24,7 @@ * @param iterable $iterable Iterable to be mapped over * @param (Closure(Tk,Tv): T) $function * - * @return list + * @return ($iterable is non-empty-array ? non-empty-list : list) */ function map_with_key(iterable $iterable, Closure $function): array {