http://d.puremagic.com/issues/show_bug.cgi?id=8542


deadalnix <deadal...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |deadal...@gmail.com


--- Comment #3 from deadalnix <deadal...@gmail.com> 2012-08-17 08:04:37 PDT ---
import std.algorithm, std.range;
template Apply(alias a,T...){ alias a!T Apply; }
auto fun(T)(T n, T function(T) i, T function(T) ){
(z=>(T delegate(T,T) delegate(T delegate(T delegate(T,T),T,T)) AOY)
=>((m,e)=>reduce!((a,b)=>AOY((f,a,b)=>z?b:i(a))(a,b))(zip([(T[]
a)=>a.map!(x=>m(n,x))].map!(a=>&Apply!(map!a,T[][])),[[n]]).map!(t=>t[0](t[1].map!(a=>[a]).array)).joiner.map!(a=>zip(a,retro(a)).map!(t=>AOY((f,a,b)=>z?b:i(a))(t[0],t[1]))).joiner.chain))((T
a,T b)=>AOY((f,a,b)=>z?n:AOY((g,a,b)=>z?b:i(a))(b,f(a,b)))(a,b),AOY))((T
a)=>a==n);
}
void main(){
version(A) fun(0,(int a)=>a+1,(int a)=>a-1);
static inc(int[] a){
return a;
}
static dec(int[] a){
return a;
}
version(B) fun((int[]).init,&inc,&dec);
}

I reduced it to that. I fail to got further.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to