Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart fold

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
ADD COMMENT
Topic
Name
5+8 =