Achatar recursivamente valores de mapas aninhados no Java 8

Dado umMap<String, Object>, em que os valores são umString ou outroMap<String, Object>, como alguém, usando Java 8, achataria os mapas para uma única lista de valores?

Exemplo:

Map - "key1" -> "value1"
    - "key2" -> "value2"
    - "key3" -> Map - "key3.1" -> "value3.1"
                    - "key3.2" -> "value3.2"
                    - "key3.3" -> Map - "key3.3.1" -> "value3.3.1"
                                      - "key3.3.2" -> "value3.3.2" 

Para o exemplo acima, eu gostaria da seguinte lista:

value1
value2
value3.1
value3.2
value3.3.1
value3.3.2

Eu sei que isso pode ser feito assim:

public static void main(String args[]) throws Exception {
    //Map with nested maps with nested maps with nested maps with nested......
    Map<String, Object> map = getSomeMapWithNestedMaps();

    List<Object> values = new ArrayList<>();
    addToList(map, values);

    for (Object o:values) {
        System.out.println(o);
    }
}

static void addToList(Map<String, Object>map, List<Object> list) {
    for (Object o:map.values()) {
        if (o instanceof Map) {
            addToList((Map<String, Object>)o, list);
        } else {
            list.add(o);
        }
    }
}

Como posso fazer isso com umStream?

Editar:

Depois de algumas brincadeiras, descobri:

public static void main(String args[]) throws Exception {
    //Map with nested maps with nested maps with nested maps with nested......
    Map<String, Object> map = getSomeMapWithNestedMaps();
    //Recursively flatten maps and print out all values
    List<Object> list= flatten(map.values().stream()).collect(Collectors.toList());
}

static Stream<Object> flatten(Stream<Object> stream) {
    return stream.flatMap((o) ->
        (o instanceof Map) ? flatten(((Map<String, Object>)o).values().stream()) : Stream.of(o)
    );
}

questionAnswers(1)

yourAnswerToTheQuestion