A basic function in Haskell can be compared to a math function.
What this function do is to transform a number x into a number x+1 (ex: f(1)=2).
In Haskell, we write this function by the same way, where f is the name of the function and x is the argument and x+1 is the result.
The type of this f function would be
f :: Int -> Int
Note that the f function receives an int value (x) and returns another int (x+1)
(Click here to get more info about types)
So this function can be written like this:
f :: Int->Int
f x = x+1
Now, imagine a function called
greater that receives two numbers and check if the first is greater than the second, e.x. greater 4 3 = True; greater 3 4 = False.
The type of this function is
greater :: Int -> Int -> Bool
And should be,initially, declared by this way
greater x y = if(x>y) then True else False
But the function >, declared at Prelude (where the basic functions, such as the sum, greater, etc, are declared), already returns a boolean value (True or False), so the declaration of the greater function can be done by this way:
greater x y = x>y
or in the extreme case
greater = >