A symbol in ATS can be overloaded with multiple functions. The following syntax introduces a symbol with the name foo for overloading.
symintr foo // symbol introduction for overloadingSuppose that foo1, foo2 and foo3 are names of three functions in ATS. Then we can overload foo with these three functions as follows:
overload foo with foo1 overload foo with foo2 overload foo with foo3An overloaded function symbol is resolved according to the number of arguments it takes and, if needed, the types of these arguments.
The code used for illustration is available here.