Fixed inference with typed functions