- C
- C
- Caml
- Clojure
- C++
- C++
- C#
- D
- Dart
- Elixir
- Erlang
- Fortran
- Go
- Haskell
- JS
- JS
- Java
- Java
- Java
- Java
- Java
- Kotlin
- Lisp
- Lua
- Obj-C
- PHP
- Pascal
- Perl
- Python
- Python
- Ruby
- Ruby
- Rust
- Rust
- Scala
- Scheme
- Scheme
- Scheme
- Scheme
- Scheme
- Smalltalk
- VB
BigInteger s = new BigInteger(valueOf(x[0]));
for (int i = 1, n = x.length; i < n; ++i)
s = s.add(new BigInteger(valueOf(x[i])));
BigInteger s = stream(x)
.mapToObj(String::valueOf)
.map(BigInteger::new)
.reduce(BigInteger::add)
.get();
id s=[x valueForKeyPath:@"@sum.self"];
Plain-C like solutions also possible; showing here a more generic approach based on the key-value coding