Loading search index…
No recent searches
No results for "Query here"
Composes with swapped inner arguments. Flips the order of composition compared to standard composition.
export const Quixotic = (x: Fn) => (y: Fn) => (z: Fn) => x(z(y)); export const Q1 = Quixotic;
const double = (x: number) => x * 2; const getValue = (fn: Fn) => fn(); const makeGetter = () => 5; const result = Quixotic(double)(makeGetter)(getValue); // 10