April 06, 2011 Re: Why doesn't curry work with multiple arguments? | ||||
---|---|---|---|---|
| ||||
Well this still hasn't solved my problem. Because I shouldn't bind from left to right, but arbitrarily. So ideally I would want this: void foo(string str, int x, int y, string str2) { } alias bind!(foo, null, 1, 2, null) twoStrings; twoStrings("abc", "def"); -> foo("abc", 1, 2, "def"); I'm pretty sure I could do this with D's templates. |
Copyright © 1999-2021 by the D Language Foundation