def tree_walk_bfs(tree):
    """Generates a binary tree walk BFS-style.
    """
    if tree is None:
        return []

    discovered = [tree, None]

    while len(discovered) > 1:
        # take first element
        current = discovered.pop(0)

        if current is None:
            discovered.append(None)
            continue

        # add its descendants to the discovered pile
        for i in [1, 2]:
            if current[i] is not None:
                discovered.append(current[i])

        yield current[0]