On Saturday, 20 January 2024 at 20:58:49 UTC, Richard (Rikki)
Andrew Cattermole wrote:
On 21/01/2024 9:55 AM, atzensepp wrote:
import std.stdio; // Overloads are resolved when the partially
applied function is called // with the remaining arguments.
struct S { static char fun(int i, string s) {
On 21/01/2024 9:55 AM, atzensepp wrote:
import std.stdio; // Overloads are resolved when the partially applied
function is called // with the remaining arguments. struct S { static
char fun(int i, string s) { return s[i]; } static int fun(int a, int b)
{ return a * b; } } void main() { alias fu
On Saturday, 20 January 2024 at 17:47:29 UTC, Richard (Rikki)
Andrew Cattermole wrote:
Not really any other way to do it, create context (i.e. struct,
or stack) and have a delegate point to both it and a patch
function.
It'll be how partial is implemented.
https://dlang.org/phobos/std_functio
On Saturday, 20 January 2024 at 17:45:36 UTC, Christian Köstlin
wrote:
Would
https://dlang.org/library/std/functional/curry.html
help you?
kind regards,
Christian
Hello Christian,
thank for the link. I looks good however in my installation (gdc
8.4.0) it says:
```d
curry.d:1:8: error: modul
Not really any other way to do it, create context (i.e. struct, or
stack) and have a delegate point to both it and a patch function.
It'll be how partial is implemented.
https://dlang.org/phobos/std_functional.html#.partial
Would
https://dlang.org/library/std/functional/curry.html
help you?
kind regards,
Christian