from typing import Any
from typing import Callable
from functools import reduce


def pipe(v: Any, *fns: Callable):
    """
    Thread a value through one or more functions.

    Functions are applied left to right

    >>> def double(n):
    ...     print(f'Doubling {n}...')
    ...     return n * 2
    >>> def inc(n):
    ...     print(f'Incrementing {n}...')
    ...     return n + 1
    >>> pipe(3, inc, double)
    Incrementing 3...
    Doubling 4...
    8
    """

    return reduce(lambda x, f: f(x), fns, v)