[Polyml] Type error in function application