Closed
Description
function flip<a, b, c>(fn: (one: a, two: b) => c): (one: b, two: a) => c {
return function flipped(one: b, two: a): c {
return fn(two, one);
};
}
function of2<a, b>(one: a, two: b): [a, b] {
return [one, two];
}
const flipped = flip(of2); // expected: <a, b>(one: b, two: a) => [a, b], actual: (one: {}, two: {}) => [{}, {}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment