Extending : Reference sample : How to extend a global function to manipulate collection data : Implement the function logic to calculate the sum of account balance
  
Implement the function logic to calculate the sum of account balance
To calculate the sum of account balance, the global function takes a value array of account balance as its parameter, and returns the calculated balance sum.
This graphic is described in the surrounding text.
Note The global function does not take IColl data as its parameter. The specified ‘IColl.*.Balance’ is automatically transformed to an array of String values by using the instances’ ‘toString()’ method. So, it is required to ensure all the instances stored in ‘IColl.*.Balance’ can be transformed into valid String values via ‘toString()’ method. And meanwhile, the values can be transformed back to its original instance type.
See also
How to extend a global function to manipulate collection data