How to divide an integer returned from a function by a double value?
swift
Solution
When you call `anInt() / Double(2)` the compiler knows you are trying divide an Int by a Double and doesn't allow that, but when you call `5 / Double(2)`, it can infer the type of 5 as a Double since you are dividing it by a Double.
Problem
Given this function: ``` func anInt() -> Int { return 5 } ``` This doesn't work: ``` anInt() / Double(2) >> ERROR: Could not find an overload for '/' that accepts the supplied arguments ``` However this works: ``` 5 / Double(2) >> 2.5 ```