logo

Crowdly

Calling functions Calling functions is the bread and butter of a programmer's...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

Calling functions

Calling functions is the bread and butter of a programmer's life. Functional programmers prefer to say that they are applying a function on some argument(s). It is the exact same concept.

Haskell's syntax for calling (applying) functions differs from what you are used to in other languages, however. There are no parentheses. The name of the function and all the arguments are simply separated by spaces.

Here is an example, in which we call the function not on the argument True:

ghci> not True

False

We can also check the type of the function not:

ghci> :t not

not :: Bool -> Bool

It takes in a Bool and produces a Bool.

Write the call to the function max to determine whether 42 or 100 is the bigger number:

Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на www.icorsi.ch?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!