// by Hirrolot use std::marker::PhantomData; struct S(PhantomData, PhantomData); struct K(PhantomData); struct Var(PhantomData); struct Appl(PhantomData, PhantomData); trait Reduce { type Result; } impl Reduce for Appl, Z> where { type Result = Appl, Appl>; } impl Reduce for Appl, Y> { type Result = X; } impl Reduce for Appl, N> { type Result = Self; } struct MyVar0; struct MyVar1; struct MyVar2; fn main() { let _0: , Appl, MyVar2>> as Reduce>::Result = todo!(); // let () = _0; }