def map(func, items, pool_size=10):
    """a parallelized work-alike to the built-in ``map`` function

    this function works by creating an :class:`OrderedPool` and placing all
    the arguments in :meth:`put<OrderedPool.put>` calls, then yielding items
    produced by the pool's :meth:`get<OrderedPool.get>` method.

    :param func: the mapper function to use
    :type func: function
    :param items: the items to use as the mapper's arguments
    :type items: iterable
    :param pool_size:
        the number of workers for the pool -- this amounts to the concurrency
        with which the map is accomplished (default 10)
    :type pool_size: int

    :returns:
        a lazy iterator (like python3's map or python2's itertools.imap) over
        the results of the mapping
    """
    with OrderedPool(func, pool_size) as pool:
        for count, item in enumerate(items):
            pool.put(item)

        for i in xrange(count + 1):
            yield pool.get()
a parallelized work-alike to the built-in ``map`` function

    this function works by creating an :class:`OrderedPool` and placing all
    the arguments in :meth:`put<OrderedPool.put>` calls, then yielding items
    produced by the pool's :meth:`get<OrderedPool.get>` method.

    :param func: the mapper function to use
    :type func: function
    :param items: the items to use as the mapper's arguments
    :type items: iterable
    :param pool_size:
        the number of workers for the pool -- this amounts to the concurrency
        with which the map is accomplished (default 10)
    :type pool_size: int

    :returns:
        a lazy iterator (like python3's map or python2's itertools.imap) over
        the results of the mapping