I define a function like this:
const func1 = <T, R>(x: T) => (f: (x: T) => R) => f(x)
Then call it like this:
func1(2 + 4)(a => a > 5)
I would expect the type of the result is boolean. but the type of func1 that typescript inferred is:
use<number, unknown>(x: number): (f: (x: number) => unknown) => unknown
How do I force typescript to recognize the type R?