mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.reference
git-svn-id: svn://ultimatepp.org/upp/trunk@10454 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
52eeacf5d8
commit
6b4db67068
1 changed files with 7 additions and 4 deletions
|
|
@ -34,9 +34,12 @@ CONSOLE_APP_MAIN{
|
|||
// DUMP(Min(empty)); // This is undefined (fails in ASSERT)
|
||||
DUMP(Min(empty, -99999));
|
||||
|
||||
int mul = 1;
|
||||
Accumulate(data, [&](int x) { mul *= x; });
|
||||
DUMP(mul);
|
||||
struct {
|
||||
int mul = 1;
|
||||
void operator()(int x) { mul *= x; };
|
||||
} acc;
|
||||
Accumulate(data, acc);
|
||||
DUMP(acc.mul);
|
||||
|
||||
DUMP(Sum(data));
|
||||
|
||||
|
|
@ -48,7 +51,7 @@ CONSOLE_APP_MAIN{
|
|||
|
||||
DUMP(Sum(data));
|
||||
|
||||
Vector<String> s = Split("one;two;three", ';');
|
||||
Vector<String> s = { "one", "two", "three" };
|
||||
DUMP(Sum(s, ""));
|
||||
|
||||
data = { 5, 7, 9, 9, 14, 20, 23, 50 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue