3 ms·
On further reflection, I think what makes this example particularly difficult to understand is not so much its use of generics, but the way it uses functions.
by timmytokyo 2y ago
On further reflection, I think what makes this example particularly difficult to understand is not so much its use of generics, but the way it uses functions. It's a function that returns a function that takes another function as an argument. The generic [K,V] type arguments are actually pretty straightforward.