Now let's go briefly through some more detailed aspects of functional language. Of course we have basic expressions, values and types. Here you can see them listed. What you do essentially in writing a programme, you build a declaration through a number of bindings of given identifiers. We will then discuss pattern matching. We will show how to give recursive function definitions. When we will discuss the typing discipline we will make sure that people understand the distinction between polymorphisms and overloading. In many languages we have operators which can apply to various types just think about plus which is defined in most programming languages with the same symbol whether we denote the plus over integer or over reals. But here it is not the same code that is used in evaluating that expression. This is just overloading. It is not the kind of polymorphism that we saw earlier when we discussed the function MAP. The type-synthesis algorithm of SML is essentially based on Robinson's unification algorithm. | ![]() |