> For the complete documentation index, see [llms.txt](https://haskell.hpmeducation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://haskell.hpmeducation.com/types-in-haskell/function-types.md).

# Function Types

We know that **functions** in Haskell are **expressions** and each expression must have a type, so what types can a function have? Functions take in some arguments and create a result of some type which can be the same as some (or all) of its arguments or a different one. We have already touched upon the subject of function types in our example function `triple`:

```haskell
triple :: Int -> Int
triple x = 3 * x
```

In this case, the type of our function triple is `Int -> Int` – it takes an`Int`as its only argument and returns an`Int`as the result. As functions are expressions, we can use them as any other type of data, for example, we can create a list of functions:

```haskell
ghci> funList = [(+), (*)]
-- (+) and (*) are functions for addition and multiplication
ghci> :t funList
Num a => [a -> a -> a]
```

We can see that `funList` is a list of a certain type – specifically, a **function type** that takes two arguments of type `Num` and returns a `Num` type as its result.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://haskell.hpmeducation.com/types-in-haskell/function-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
