Next | Types Are Theorems; Programs Are Proofs | 2 |

inc n = n + 1 inc::Int -> Int

Polymorphism:

length :: [a] -> Int id ::a->a

Anonymous functions:

\n -> n + 1 :: Int -> Int

\x -> x :: a -> a\x -> 3 :: a -> Int

(The

`\`is supposed to remind you of a`λ`)

Next | Next |