when pycharm supports type hinting for any implementation of currying,
    map_with and map_on would be deprecated.
    >>> from Redy.Collections import Traversal, Flow
    >>> def double(x: int) -> int: return x * 2
    >>> lst: Iterable[int] = [1, 2, 3]
    >>> x = Flow(lst)[Traversal.map_by(double)][Traversal.sum_from(0)].unbox
    >>> assert x is 12
    now you can get the hinting that `x` is of type `int`

def map_by(fn: Callable[[T1], T2]) -> Callable[[ActualIterable[T1]], Iterable[T2]]:
    """
    when pycharm supports type hinting for any implementation of currying,
    map_with and map_on would be deprecated.
    >>> from Redy.Collections import Traversal, Flow
    >>> def double(x: int) -> int: return x * 2
    >>> lst: Iterable[int] = [1, 2, 3]
    >>> x = Flow(lst)[Traversal.map_by(double)][Traversal.sum_from(0)].unbox
    >>> assert x is 12
    now you can get the hinting that `x` is of type `int`
    """
    return lambda collection: builtins.map(fn, collection)