<?php
namespace nur\mapper;

use nur\mapper\base\Consumer;
use nur\mapper\base\Mapper;

class pl {
  /**
   * appliquer un ensemble de mappers, instances de {@link Mapper}, sur un
   * iterable, typiquement une instance de {@link Producer}
   */
  static final function consume($producer, ...$mappers): Consumer {
    $consumer = new Consumer($producer, ...$mappers);
    $consumer->consume();
    return $consumer;
  }
}
