---
logosub: "Software"
language: "en"
title: "Pattern matching"
code: "Haskell"
---

An example to determine the third element of a list, (with at least 3 elements):

```haskell
third :: [a] -> a 
third (_:_:x:_) = x
```

