diff --git a/src/Seed.php b/src/Seed.php index 6bc068c..ccb9e09 100644 --- a/src/Seed.php +++ b/src/Seed.php @@ -22,17 +22,29 @@ final class Seed { /** - * Create a merged iterable. + * Chain multiple iterable collections into a single one. + * The input collections are not actually merged, but a generator is produced. + * * Can be used to prepend or append data from multiple source collections. - * The data is not actually merged, but a generator is produced. */ - public static function merged(iterable ...$input): Generator + public static function chain(iterable ...$input): Generator { foreach ($input as $iterable) { yield from $iterable; } } + /** + * An alias of `chain`. + * + * Creates a "merged" iterable from multiple collections. + * The input collections are not actually merged, but a generator is produced. + */ + public static function merged(iterable ...$input): Generator + { + return self::chain(...$input); + } + /** * Prepend `null` value at the beginning of the data collection. * Use when missing root.