def fuse_list( mafs ):
    """
    Try to fuse a list of blocks by progressively fusing each adjacent pair.
    """
    last = None
    for m in mafs:
        if last is None:
            last = m
        else:
            fused = fuse( last, m )
            if fused:
                last = fused
            else:
                yield last
                last = m
    if last:
        yield last
Try to fuse a list of blocks by progressively fusing each adjacent pair.