Vo Minh Thu wrote:
2010/7/25 Andrew Coppin <andrewcop...@btinternet.com>:
Since you're interested in comparisons... A method is simply a way of giving
the same name to several different functions, and have the compiler pick the
correct one based on the argument types.
[snip]

Actually in Haskell, the choice of the correct definition is not only
based on the argument types. It could be based on the result type:

Yes, quite right.

It's also possible to use "phantom types" to make the program do different things even thought the run-time representation of data hasn't changed at all. Haskell is like that. ;-)

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to