functional programming with Dart lists
Find this at dartpad.dartlang.org/?source=42b03283-dde8-4da9-a7f6-76abd15e400a.
Created with <3 with dartpad.dartlang.org.
functional programming with Dart lists
Find this at dartpad.dartlang.org/?source=42b03283-dde8-4da9-a7f6-76abd15e400a.
Created with <3 with dartpad.dartlang.org.
void main() { | |
var v = [ 1,2,3,4,5,6,7,8,9,10 ]; | |
print(v); | |
print(v.contains(5)); | |
print(v.where((x) => x % 2 == 0)); | |
print(v.any((x) => x > 10)); | |
print(v.map((x) => x * x)); | |
print(v.length); | |
} |