I think I will dedicate tonight one or two hours to understand
the first two proposals :-D.
On Thursday, 24 September 2020 at 13:28:25 UTC, WebFreak001 wrote:
[...]
Alternatively a lot easier would be to just return auto and do:
auto dt(alias fun, T)(Dot!T t){
return t.dot(t => unaryFu
On Thursday, 24 September 2020 at 14:15:01 UTC, ddcovery wrote:
[...]
I think I will dedicate tonight one or two hours to understand
the first two proposals :-D.
[...]
Not necessary, really simple and well explained WebFreak001!!!
On Thursday, 24 September 2020 at 11:15:11 UTC, ddcovery wrote:
[...]
Example: I tried with a global function
Dot!R dt(alias fun, T, R)(Dot!T t){
auto f = cast(R function(T)) unaryFun!fun;
return t.dot!R(f);
}
[...]
the problem is the template can't automatically determine the
type "R". A
Last week, in general forum someone introduced the possibility to
implement the .? operator in D:
https://forum.dlang.org/thread/blnjoaleswqnaojou...@forum.dlang.org
I decided to implement a simple solution with a funciontal syntax:
string fatherName =
dot(person).dot(a=>a.father).dot(a=>a.na