def reductions(f, seq, acc=EMPTY):
    """Yields intermediate reductions of seq by f."""
    if acc is EMPTY:
        return accumulate(seq) if f is operator.add else accumulate(seq, f)
    return _reductions(f, seq, acc)
Yields intermediate reductions of seq by f.
funcy/seqs.py