tags:

views:

52

answers:

1

Since curried functions cannot be overloaded and modules cannot have members, does this mean there is no way to have an overloaded function in a module? The answer seems obvious, but I want to make sure there's not something I'm overlooking.

+3  A: 

Correct, no overloaded functions in modules (more generally, no way to overload a let-bound function). If you say f, then f always has a single type, whereas if you say o.f, that may refer to a group of overloads (resolved by surrounding context).

Brian