def simulate_one(chain, state={}, config={}):
    """
    Simulate a chain once

    Args:
        - chain: an iterable with functions of type
            f(state, log) -> new_state
        - state (default: {}): initial state to apply chain to
        - config (default: {}): pass configuration parameters in a dictionary
    Returns:
        Dictionary with the log
    """
    log = {}
    for link in chain:
        # might want to just update in place;
        # not return new_state but overwrite state
        state = link(state, config, log)

    return log