Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart fold list

final list = ['a', 'bb', 'ccc'];
// compute the sum of all length
list.fold(0, (total, x) => total + x.length); // result is 6
//        ^
// starting value
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dart #fold #list
ADD COMMENT
Topic
Name
8+5 =