O que isso imprime?
void main() {
final xs = [7, 8, 6, 3];
final out = xs
.where((e) => e > 6)
.fold(0, (a, b) => a + b);
print(out);
}
Experimente no Dart Playground online →
[spoiler title="Solução"]
Resposta:
15
Explicação:
where filtra valores e fold acumula em uma soma.
[/spoiler]

