https://issues.dlang.org/show_bug.cgi?id=15732

ZombineDev <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from ZombineDev <[email protected]> ---
Since the https://github.com/dlang/phobos/pull/6497 was merged, a fixed version
of the example above compiles:

auto partial_application () {
    // definition of a basic function on 3 parameters using lambda syntax
    auto basic = (float a, float b, float c) => a + b / c;

    // partially apply value to basic    
    import std.functional : partial;
    alias partial!(basic, 1) apply1;

    return &apply1; // now OK, didn't compile before
}

void main(string[] args) {

    auto test = partial_application();

    import std.stdio : writeln;
    writeln("result: ", test(2, 3)); // 1 + (2/3) = 1.66667
}

I see no reason why the GitHub -> Bugzilla integration didn't close the issue
automatically, so I'm closing it manually.

--

Reply via email to