then the function is checked based on the restriction.
A better way would be to synthesise the function with the knowledge/expectation that it is expected to be a function as number => U. This means that the new_function can then create parameter restrictions eagerly.
This could be considered as traditional type inference
Currently the
mapper
functionsa
parameter is synthesised as genericthen the function is checked based on the restriction.
A better way would be to synthesise the function with the knowledge/expectation that it is expected to be a function as
number => U
. This means that thenew_function
can then create parameter restrictions eagerly.This could be considered as traditional type inference