A binding binds a name or even several names with a function definition.
In Haskell, a binding is defined by symbol “=” whereas
half x), on the left hand side of the equal sign (=)half is the function that can take parameter xhalf can be evaluated by name with a parameter just right behind the function name (e.g. half 5)x / 2), on the right hand side(/) with parameter x and 2half x = x / 2
2.5
half 5 is in round brackets, which means half 5 has to be evaluated and its result is the first parameter of print. The expression print half 5 would lead to a compiler error, beause this would be interpreted as print has two parameters.[ <elem 1>, <elem 2>, … <elem n>][] is an empty list[a], whereas a is a type parameter[ ]: is an operator that appends an element on the left hand side to a list on the right hand side: is associated to the right3 : 2 : [] equals (3 : (2 : []))[ <elem n+1>, <elem n+2>, … <elem m>](3 : (2 : [])) equals 3 : [2] equals [3, 2][first, b, zet] = [13, 17, 19]
13 17 19
( <elem 1>, <elem 2>, … <elem n>)[first, b, zet] = [13, 17, 19]
'a' 12 23.4
data <TypeName> = <DataConstructorA> <DataTypeA1> <DataTypeA2> … <DataTypeAN> | <DataConstructorB> <DataTypeB1> <DataTypeB2> … <DataTypeBM> | <DataConstructorO> … | devides variants simmilar to variants in unions in programming the language C and C++12 'a' 23.4 123
MyVariantC is already a value in itself, and can be used to differentiate between the variants.