Hi
I have a problem:

What's wrong about this code?
Code:

import std.stdio;

int main() {
        writefln("%f", add(100, 786, 56.0));
        return 0;
}

double add(double delegate()[] dgs...) {
        double result = 0;
        foreach(double delegate() dg; dgs) {
                result += dg;
        }
        return result;
}

Or a better question is: How can I get the value out of the delegate?

Greetings Fabian Claßen

PS: I am a beginner :P
begin:vcard
fn;quoted-printable:Fabian Cla=C3=9Fen
n;quoted-printable:Cla=C3=9Fen;Fabian
adr:;;;;;;Germany
email;internet:[EMAIL PROTECTED]
url:http://fabs-world.de
version:2.1
end:vcard

Reply via email to