[Issue 15732] std.function partial does not work with function / delegate references

2018-08-26 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15732

Johannes Loher  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||johannes.lo...@fg4f.de
 Resolution|--- |FIXED

--- Comment #4 from Johannes Loher  ---
It seems, this was not actually closed. Closing it now.

--


[Issue 15732] std.function partial does not work with function / delegate references

2018-08-24 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15732

ZombineDev  changed:

   What|Removed |Added

 CC||petar.p.ki...@gmail.com

--- Comment #3 from ZombineDev  ---
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  // 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.7
}

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

--


[Issue 15732] std.function partial does not work with function / delegate references

2018-05-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15732

Marco de Wild  changed:

   What|Removed |Added

 CC||nanaya...@gmail.com
   Assignee|nob...@puremagic.com|nanaya...@gmail.com

--


[Issue 15732] std.function partial does not work with function / delegate references

2018-03-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15732

Seb  changed:

   What|Removed |Added

   Keywords||bootcamp
 CC||greensunn...@gmail.com

--


[Issue 15732] std.function partial does not work with function / delegate references

2016-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15732

--- Comment #2 from mikey  ---
Example of error:

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 
// Error: partial(Ts...)(Ts args2) is not an lvalue
}

void main(string[] args) {

auto test = partial_application();

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

--


[Issue 15732] std.function partial does not work with function / delegate references

2016-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15732

Ketmar Dark  changed:

   What|Removed |Added

 CC||ket...@ketmar.no-ip.org

--


[Issue 15732] std.function partial does not work with function / delegate references

2016-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15732

Ketmar Dark  changed:

   What|Removed |Added

   Hardware|x86_64  |All
 OS|Linux   |All
   Severity|enhancement |minor

--


[Issue 15732] std.function partial does not work with function / delegate references

2016-02-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15732

--- Comment #1 from mikey  ---
Created attachment 1588
  --> https://issues.dlang.org/attachment.cgi?id=1588=edit
Examle of "fixed" partial

--