1
1
mirror of https://github.com/thma/WhyHaskellMatters.git synced 2024-09-11 13:46:11 +03:00

pattern matching

This commit is contained in:
Mahler, Thomas 2020-03-28 21:32:27 +01:00
parent 151c428e04
commit 7e9fc82e1e

View File

@ -416,7 +416,6 @@ A list containing the three numbers 1, 2, 3 is contructed like this:
Luckily the language designers have been so kind to offer some syntactic sugar for this. So the first list can be
written as `[1]` and the second as `[1, 2, 3]`.
```haskell
-- | Extract the first element of a list, which must be non-empty.
head :: [a] -> a