Slide 1

Slide 1 text

An Introduction to Haskell Joe Wang

Slide 2

Slide 2 text

Content History Overview Features by example

Slide 3

Slide 3 text

Alonzo Church(1930s) Lambda calculus Robin Milner(1973) Meta-Language(ML) John McCarthy(1958) Lisp Simon Peyton Jones (1990) Haskell 1.0 History

Slide 4

Slide 4 text

September 12, 1900 – September 1, 1982, American Both `Haskell` and `Curry` is named after his name Devoted all his life to Combinatorial Logic Haskell Brook Curry

Slide 5

Slide 5 text

Overview

Slide 6

Slide 6 text

Overview

Slide 7

Slide 7 text

Overview A “hello world” example

Slide 8

Slide 8 text

Feature Pure Function Lazy Evaluation Pattern Matching Monad Powerful Type system More

Slide 9

Slide 9 text

Feature Function && Lambda

Slide 10

Slide 10 text

Feature Function Composition

Slide 11

Slide 11 text

Feature Recursion && Laziness

Slide 12

Slide 12 text

Feature Pattern Matching && Guard

Slide 13

Slide 13 text

Feature Monad What is monad? A monad is just a monoid in the category of endofunctors

Slide 14

Slide 14 text

Feature Monad WTF!!!

Slide 15

Slide 15 text

Feature Monad

Slide 16

Slide 16 text

Feature Monad

Slide 17

Slide 17 text

Summary Haskell is an elegant Language High-level abstraction All we care is the composition of functions and types Lack of learning resources, especially in China Hard to find a work in realworld

Slide 18

Slide 18 text

The End