3 ms·
It's typed, but the types can be fully inferred. If you didn't specify the types of your function, it could end up being inferred as float -> float -> float ins
by wtetzner 9y ago
It's typed, but the types can be fully inferred. If you didn't specify the types of your function, it could end up being inferred as float -> float -> float instead of int -> int -> int.
The different operators are a concise way to tell the type-checker that you're working with floats.
- xfer 9y agoNo it won't be inferred as float->float->float if there is an int literal or whatever base type you pass to the function. Check typeclasses for how this works.