SlideShare a Scribd company logo
1 of 137
Download to read offline
Haskell
A Whirlwind Tour
          (Part II)
   William Taysom ~ 2011
Haskell is a non-strict,
purely functional
programming language
with strong,
static type inference.
Review
Recursive Data

data Color = Red | Green | Blue
           | Mix Color Color
Recursive Functions

hue   :: Color -> Double
hue   Red     =0
hue   Green = 120
hue   Blue    = 240
h' = 60
hue (Mix c c') = let
    h = hue c
    h' = hue c'
    m = average h h'        m = 180
    m' = norm (m + 180)               m' = 0
    d = distance h m
  in case compare d 90 of
    LT -> m
    EQ -> nan                           h = 300
    GT -> m'

norm h | h < 360 = h
       | otherwise = norm (h - 360)
Parametric
  Types
Tuple (Product)

data Point = Point Double Double
Tuple (Product)

data Pair a b = Pair a b
Tuple (Product)

data (a, b) = (a, b)
-- Built-in syntax:
-- definition only for illustrative purposes.
Tuple (Product)
ghci> (Blue, False)



data (a, b) = (a, b)
-- Built-in syntax:
-- definition only for illustrative purposes.
ghci> (Blue, False)
(Blue,False)
ghci>
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
(Blue,False)
ghci>
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
(Blue,False)
ghci> :t it
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
(Blue,False)
ghci> :t it
it :: (Color, Bool)
ghci>
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
(Blue,False)
ghci> :t it
it :: (Color, Bool)
ghci> :t (,)
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
(Blue,False)
ghci> :t it
it :: (Color, Bool)
ghci> :t (,)
(,) :: a -> b -> (a, b)
ghci>
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
(Blue,False)
ghci> :t it
it :: (Color, Bool)
ghci> :t (,)
(,) :: a -> b -> (a, b)
ghci> :kind (,)
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
(Blue,False)
ghci> :t it
it :: (Color, Bool)
ghci> :t (,)
(,) :: a -> b -> (a, b)
ghci> :kind (,)
(,) :: * -> * -> *
ghci>
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
(Blue,False)
ghci> :t it
it :: (Color, Bool)
ghci> :t (,)
(,) :: a -> b -> (a, b)
ghci> :kind (,)
(,) :: * -> * -> *
ghci> :k Color
ghci> (Blue, False)
(Blue,False)
ghci> (,) Blue False
(Blue,False)
ghci> :t it
it :: (Color, Bool)
ghci> :t (,)
(,) :: a -> b -> (a, b)
ghci> :kind (,)
(,) :: * -> * -> *
ghci> :k Color
Color :: *
ghci>
Color :: *
ghci>
Color :: *
ghci> :t (Red, Blue, Green)
Color :: *
ghci> :t (Red, Blue, Green)
(Red, Blue, Green) :: (Color, Color, Color)
ghci>
Color   :: *
ghci>   :t (Red, Blue, Green)
(Red,   Blue, Green) :: (Color, Color, Color)
ghci>   :t (,,)
Color :: *
ghci> :t (Red, Blue, Green)
(Red, Blue, Green) :: (Color, Color, Color)
ghci> :t (,,)
(,,) :: a -> b -> c -> (a, b, c)
ghci>
Color :: *
ghci> :t (Red, Blue, Green)
(Red, Blue, Green) :: (Color, Color, Color)
ghci> :t (,,)
(,,) :: a -> b -> c -> (a, b, c)
ghci> :t (,,,)
Color :: *
ghci> :t (Red, Blue, Green)
(Red, Blue, Green) :: (Color, Color, Color)
ghci> :t (,,)
(,,) :: a -> b -> c -> (a, b, c)
ghci> :t (,,,)
(,,,) :: a -> b -> c -> d -> (a, b, c, d)
ghci>
Color :: *
ghci> :t (Red, Blue, Green)
(Red, Blue, Green) :: (Color, Color, Color)
ghci> :t (,,)
(,,) :: a -> b -> c -> (a, b, c)
ghci> :t (,,,)
(,,,) :: a -> b -> c -> d -> (a, b, c, d)
ghci> :t ()
Color :: *
ghci> :t (Red, Blue, Green)
(Red, Blue, Green) :: (Color, Color, Color)
ghci> :t (,,)
(,,) :: a -> b -> c -> (a, b, c)
ghci> :t (,,,)
(,,,) :: a -> b -> c -> d -> (a, b, c, d)
ghci> :t ()
() :: ()
ghci>
Color :: *
ghci> :t (Red, Blue, Green)
(Red, Blue, Green) :: (Color, Color, Color)
ghci> :t (,,)
(,,) :: a -> b -> c -> (a, b, c)
ghci> :t (,,,)
(,,,) :: a -> b -> c -> d -> (a, b, c, d)
ghci> :t ()
() :: ()
ghci> -- Trivial is similar to void.
Either (Sum)
Color :: *
ghci> :t (Red, Blue, Green)
(Red, Blue, Green) :: (Color, Color, Color)
ghci>Either a b = Left a | Right b
 data :t (,,)
(,,) :: a -> b -> c -> (a, b, c)
ghci> :t (,,,)
(,,,) :: a -> b -> c -> d -> (a, b, c, d)
ghci> :t ()
() :: ()
ghci> -- Trivial is similar to void.
ghci>
Either (Sum)

data Either a b = Left a | Right b
Maybe (Optional)

data Maybe a = Nothing | Just a
hue   :: Color -> Double
hue   Red     =0
hue   Green = 120
hue   Blue    = 240

hue (Mix c c') = ... sometimes NaN
hue   :: Color -> Double
hue   Red     =0
hue   Green = 120
hue   Blue    = 240

hue (Mix c c') = ... sometimes nothing
hue   :: Color -> Maybe Double
hue   Red     =0
hue   Green = 120
hue   Blue    = 240

hue (Mix c c') = ... sometimes nothing
hue   :: Color -> Maybe Double
hue   Red     = Just 0
hue   Green = Just 120
hue   Blue    = Just 240

hue (Mix c c') = ... sometimes nothing
hue   :: Color -> Maybe Double
hue   Red     = Just 0
hue   Green = Just 120
hue   Blue    = Just 240

hue (Mix c c') = let
    ... stuff ...
  in case compare d 90 of
    LT -> m
    EQ -> nan
    GT -> m'
hue   :: Color -> Maybe Double
hue   Red     = Just 0
hue   Green = Just 120
hue   Blue    = Just 240

hue (Mix c c') = let
    ... stuff ...
  in case compare d 90 of
    LT -> Just m
    EQ -> nan
    GT -> Just m'
hue   :: Color -> Maybe Double
hue   Red     = Just 0
hue   Green = Just 120
hue   Blue    = Just 240

hue (Mix c c') = let
    ... stuff ...
  in case compare d 90 of
    LT -> Just m
    EQ -> Nothing
    GT -> Just m'
hue   :: Color -> Maybe Double
hue   Red     = Just 0
hue   Green = Just 120
hue   Blue    = Just 240

hue (Mix c c') = let
    h = hue c
    h' = hue c'
    ... stuff ...
  in case compare d 90 of
    LT -> Just m
    EQ -> Nothing
    GT -> Just m'
hue (Mix c c') = let
    h = hue c
    h' = hue c'
    ...
hue (Mix c c') = let
    h = hue c
    h' = hue c'
    ...
hue (Mix c c') = let
    (h, h') = (hue c, hue c')
    ...
hue (Mix c c') = case (hue c, hue c') of
    (h, h') -> let
    ...
hue (Mix c c') = case (hue c, hue c') of
    (Just h, Just h') -> let
    ...
hue (Mix c c') = case (hue c, hue c') of
    (Just h, Just h') -> let
       ...
   (Just h, Nothing) -> ...
   (Nothing, Just h') -> ...
   (Nothing, Nothing) -> ...
hue (Mix c c') = case (hue c, hue c') of
    (Just h, Just h') -> let
       ...
   (Just h, Nothing) -> Nothing
   (Nothing, Just h') -> Nothing
   (Nothing, Nothing) -> Nothing
hue (Mix c c') = case (hue c, hue c') of
    (Just h, Just h') -> let
       ...
    _                 -> Nothing
hue (Mix c c') = case (hue c, hue c') of
    (Just h, Just h') -> let
        m = average h h'
        m' = norm (m + 180)
        d = distance h m
      in case compare d 90 of
        LT -> Just m
        EQ -> Nothing
        GT -> Just m'
    _                 -> Nothing
Parametric
Polymorphism

id x = x


const x _ = x


flip f x y = f y x
Parametric
Polymorphism
id :: a -> a
id x = x


const x _ = x


flip f x y = f y x
Parametric
Polymorphism
id :: a -> a
id x = x

const :: a -> b -> a
const x _ = x


flip f x y = f y x
Parametric
Polymorphism
id :: a -> a
id x = x

const :: a -> b -> a
const x _ = x

flip :: (a -> b -> c) -> b -> a -> c
flip f x y = f y x
Parametric
Polymorphism

infixr . -- defaults to 9
(f . g) x = f (g x)
Parametric
Polymorphism
(.) :: (b -> c) -> (a -> b) -> a -> c
infixr . -- defaults to 9
(f . g) x = f (g x)
Parametric
Polymorphism
(.) :: (b -> c) -> (a -> b) -> a -> c
infixr . -- defaults to 9
(f . g) x = f (g x)

isN :: Double -> Bool
isN = not . isNaN
Parametric
Polymorphism
(.) :: (b -> c) -> (a -> b) -> a -> c
infixr . -- defaults to 9
(f . g) x = f (g x)

isN :: Double -> Bool
isN = not . isNaN

celsiusToFahrenheit :: Double -> Double
celsiusToFahrenheit t = 9/5 * t + 32
Parametric
Polymorphism
(.) :: (b -> c) -> (a -> b) -> a -> c
infixr . -- defaults to 9
(f . g) x = f (g x)

isN :: Double -> Bool
isN = not . isNaN

celsiusToFahrenheit :: Double -> Double
celsiusToFahrenheit t = 9/5 * t + 32
celsiusToFahrenheit' = (32 +) . (9/5 *)
Parametric
Polymorphism

infixr 0 $ -- very low precedence.
f$x=fx
Parametric
Polymorphism
($) :: (a -> b) -> a -> b
infixr 0 $ -- very low precedence.
f$x=fx
Parametric
Polymorphism
($) :: (a -> b) -> a -> b
infixr 0 $ -- very low precedence.
f$x=fx

-- Allows you to drop parenthesis:
n = sqrt ( abs ( cos 1))
n' = sqrt $ abs $ cos 1
List (Stream)

data List a = Nil | Cons a (List a)
List (Stream)

data [a] = [] | a:[a]
-- Built-in syntax:
-- definition only for illustrative purposes.
List (Stream)
ghci> [1,2,3]



data [a] = [] | a:[a]
-- Built-in syntax:
-- definition only for illustrative purposes.
ghci> [1,2,3]
[1,2,3]
ghci>
ghci> [1,2,3]
[1,2,3]
ghci> 1:[2,3]
ghci> [1,2,3]
[1,2,3]
ghci> 1:[2,3]
[1,2,3]
ghci>
ghci> [1,2,3]
[1,2,3]
ghci> 1:[2,3]
[1,2,3]
ghci> 1:2:3:[]
ghci> [1,2,3]
[1,2,3]
ghci> 1:[2,3]
[1,2,3]
ghci> 1:2:3:[]
[1,2,3]
ghci>
ghci> [1,2,3]
[1,2,3]
ghci> 1:[2,3]
[1,2,3]
ghci> 1:2:3:[]
[1,2,3]
ghci> :t (:)
ghci> [1,2,3]
[1,2,3]
ghci> 1:[2,3]
[1,2,3]
ghci> 1:2:3:[]
[1,2,3]
ghci> :t (:)
(:) :: a -> [a] -> [a]
ghci>
ghci> [1,2,3]
[1,2,3]
ghci> 1:[2,3]
[1,2,3]
ghci> 1:2:3:[]
[1,2,3]
ghci> :t (:)
(:) :: a -> [a] -> [a]
ghci> :t []
Characters
ghci> [1,2,3]
[1,2,3]
ghci> 1:[2,3]
[1,2,3]
 c = 'c'
ghci> 1:2:3:[]
 six = '6'
[1,2,3]
 tab = 't'
ghci> :t (:)
(:) :: aisAlpha, isDigit :: Char -> Bool
 isSpace, -> [a] -> [a]
ghci> Char -> Int
 ord :: :t []
[] :: Int -> Char
 chr :: [a]
ghci>
Characters

c = 'c'
six = '6'
tab = 't'

isSpace, isAlpha, isDigit :: Char -> Bool
ord :: Char -> Int
chr :: Int -> Char
Strings (Type Synonym)

type String = [Char]
Strings (Type Synonym)
ghci> :info String



type String = [Char]
ghci> :info String
type String = [Char] ! Defined in
                     --
GHC.Base
ghci>
ghci> :info String
type String = [Char] ! Defined in
                     --
GHC.Base
ghci> ['h', 'e', 'l', 'l', 'o']
ghci> :info String
type String = [Char] ! Defined in
                     --
GHC.Base
ghci> ['h', 'e', 'l', 'l', 'o']
"hello"
ghci>
ghci> :info String
type String = [Char] ! Defined in
                     --
GHC.Base
ghci> ['h', 'e', 'l', 'l', 'o']
"hello"
ghci> :t error
ghci> :info String
type String = [Char] ! Defined in
                     --
GHC.Base
ghci> ['h', 'e', 'l', 'l', 'o']
"hello"
ghci> :t error
error :: [Char] -> a
ghci>
ghci> :info String
type String = [Char] ! Defined in
                     --
GHC.Base
ghci> ['h', 'e', 'l', 'l', 'o']
"hello"
ghci> :t error
error :: [Char] -> a
ghci> error "oops"
Arithmetic Sequences
ghci> :info String
type String = [Char] ! Defined in
                      --
GHC.Base
ghci> ['h', 'e', 'l', 'l', 'o']
 one_ten = [1..10]
"hello"
 a_z     = ['a'..'z']
ghci> :t error
error :: [Char] -> a
ghci> error "oops"
*** Exception: oops
ghci>
Arithmetic Sequences

one_ten = [1..10]
a_z     = ['a'..'z']
Arithmetic Sequences

nats = [1..]
Length

length :: [a] -> Int
length []     =0
length (_:xs)= 1 + length xs


length one_ten --> 10
length a_z     --> 26
Map

map :: (a -> b) -> [a] -> [b]
map f []     = []
map f (x:xs) = f x : map f xs


map ord "abc" --> [97, 98, 99]
Append

(++) :: [a] -> [a] -> [a]
infixr 5 ++
[]     ++ ys = ys
(x:xs) ++ ys = x : (xs ++ ys)


"hello" ++ " " ++ "world" --> "hello world"
Filter

filter :: (a -> Bool) -> [a] -> [a]
filter p []    = []
filter p (x:xs)
  |px          = x : filter p xs
  | otherwise =      filter p xs


filter (> 7) one_ten --> [8, 9, 10]
Fold

foldr :: (a -> b -> b) -> b -> [a] -> b
foldr f z []     =z
foldr f z (x:xs) = f x (foldr f x xs)


foldr (*) 1 [1..5] --> 120
Concat (Flattening)

concat :: [[a]] -> [a]
concat = foldr (++) []


concat ["hello", ", ", "world"] --> "hello, world"
List
Comprehensions
List Comprehensions

divides x y = rem y x == 0

divisors x = [d | d <- [1..x], d `divides` x]
Generators

[ (a, a, a) | a <- nats]



[(1,1,1),(2,2,2),(3,3,3),⋯]
Generators

[ (a, b, c) | a <- nats, b <- nats, c <- nats]



[(1,1,1),(1,1,2),(1,1,3),⋯]
Generators

[ (a, b, c) | a <- nats, b <- nats, c <- nats]



[(1,1,1),(1,1,2),(1,1,3),⋯]

(1,2,3) (1,3,2)
(2,1,3) (3,1,2)
(2,3,1) (3,2,1)
Generators

[ (a, b, c) | a <- nats, b <- [1..a], c <- [1..b]]



[(1,1,1),(2,1,1),(2,2,1),⋯]
Generators

[ (a, b, c) | c <- nats, b <- [1..c], a <- [1..b]]



[(1,1,1),(1,1,2),(1,2,2),⋯]
Guards

[ (a, b, c) | c <- nats, b <- [1..c], a <- [1..b],
   a^2 + b^2 == c^2]



[(3,4,5),(6,8,10),(5,12,13),⋯]
Local Declaration

[ (a, b, c) | c <- nats, b <- [1..c], a <- [1..b],
   a^2 + b^2 == c^2,
   ...
   commonDivisors == [1]]



[(3,4,5),(5,12,13),(8,15,17),⋯]
Local Declaration

[ (a, b, c) | c <- nats, b <- [1..c], a <- [1..b],
   a^2 + b^2 == c^2,
   let commonDivisors = [d | d <- divisors a,
      d `divides` b, d `divides` c],
   commonDivisors == [1]]



[(3,4,5),(5,12,13),(8,15,17),⋯]
Local Declaration

[ (a, b, c) | c <- nats, b <- [1..c], a <- [1..b],
   a^2 + b^2 == c^2,
   let d = gcd a b,
   d == 1]



[(3,4,5),(5,12,13),(8,15,17),⋯]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

primes
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

sieve [2..]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

sieve (2:[3..])
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : sieve [x | x <- [3..], rem x 2 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : sieve [x | x <- 3:[4..], rem x 2 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : sieve (3:[x | x <- [4..], rem x 2 /= 0])
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : sieve [x |
   x <- [x | x <- [4..], rem x 2 /= 0],
   rem x 3 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : sieve [x |
   x <- [x | x <- 4:[5..], rem x 2 /= 0],
   rem x 3 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : sieve [x |
   x <- [x | x <- [5..], rem x 2 /= 0],
   rem x 3 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : sieve [x |
   x <- [x | x <- 5:[6..], rem x 2 /= 0],
   rem x 3 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : sieve [x |
   x <- 5:[x | x <- [6..], rem x 2 /= 0],
   rem x 3 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : sieve (5:[x |
   x <- [x | x <- [6..], rem x 2 /= 0],
   rem x 3 /= 0])
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : 5 : sieve [x |
   x <- [x |
     x <- [x | x <- [6..], rem x 2 /= 0],
     rem x 3 /= 0]),
   rem x 5 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : 5 : sieve [x |
   x <- [x |
     x <- [x | x <- 6:[7..], rem x 2 /= 0],
     rem x 3 /= 0]),
   rem x 5 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : 5 : sieve [x |
   x <- [x |
     x <- [x | x <- [7..], rem x 2 /= 0],
     rem x 3 /= 0]),
   rem x 5 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : 5 : sieve [x |
   x <- [x |
     x <- [x | x <- 7:[8..], rem x 2 /= 0],
     rem x 3 /= 0]),
   rem x 5 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : 5 : sieve [x |
   x <- [x |
     x <- 7:[x | x <- [8..], rem x 2 /= 0],
     rem x 3 /= 0]),
   rem x 5 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : 5 : sieve [x |
   x <- 7:[x |
     x <- [x | x <- [8..], rem x 2 /= 0],
     rem x 3 /= 0]),
   rem x 5 /= 0]
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : 5 : sieve (7:[x |
   x <- [x |
     x <- [x | x <- [8..], rem x 2 /= 0],
     rem x 3 /= 0]),
   rem x 5 /= 0])
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

2 : 3 : 5 : 7 : sieve ⋯
Recursion

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]

[2, 3, 5, 7, sieve ⋯]
To be continued...
Summary



Haskell has parametric types.

List Comprehensions are cool.
Preview: Infinite Lists

primes = sieve [2..] where
  sieve (p:xs) =
    p : sieve [x | x <- xs, rem x p /= 0]
Preview: IO (echo.hs)

import System.Environment (getArgs)
import Data.List (intercalate)

main = do
  args <- getArgs
  putStrLn (intercalate " " args)
Preview: Parsers
Preview: Parse JSON

data Value =   String   String
           |   Number   Double
           |   Object   [(String, Value)]
           |   Array    [Value]
           |   Bool     Bool
           |   Null
Preview: Parse JSON

value = String     <$>jsstring
    <|> Number <$>number
    <|> Object     <$>commaGroup '{' pair '}'
    <|> Array      <$>commaGroup '[' value ']'
    <|> Bool True <$ string "true"
    <|> Bool False <$ string "false"
    <|> Null       <$ string "null"
Preview: Parse JSON

pair :: Parser (String, Value)
pair = do
  s <- jsstring
  sp_char_sp ':'
  v <- value
  spaces
  return (s, v)
To be continued...

More Related Content

What's hot

Algorithm Design and Analysis - Practical File
Algorithm Design and Analysis - Practical FileAlgorithm Design and Analysis - Practical File
Algorithm Design and Analysis - Practical FileKushagraChadha1
 
関数潮流(Function Tendency)
関数潮流(Function Tendency)関数潮流(Function Tendency)
関数潮流(Function Tendency)riue
 
learn you some erlang - chap0 to chap2
learn you some erlang - chap0 to chap2learn you some erlang - chap0 to chap2
learn you some erlang - chap0 to chap2경미 김
 
Ciklum net sat12112011-alexander fomin-expressions and all, all, all
Ciklum net sat12112011-alexander fomin-expressions and all, all, allCiklum net sat12112011-alexander fomin-expressions and all, all, all
Ciklum net sat12112011-alexander fomin-expressions and all, all, allCiklum Ukraine
 
learn you some erlang - chap3 to chap5
learn you some erlang - chap3 to chap5learn you some erlang - chap3 to chap5
learn you some erlang - chap3 to chap5경미 김
 
Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語ikdysfm
 
Functional Patterns for the non-mathematician
Functional Patterns for the non-mathematicianFunctional Patterns for the non-mathematician
Functional Patterns for the non-mathematicianBrian Lonsdorf
 
10.5 more on language of functions x
10.5 more on language of functions x10.5 more on language of functions x
10.5 more on language of functions xmath260
 
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFGo vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFTimur Safin
 
Higher nov 2008_p1old
Higher nov 2008_p1oldHigher nov 2008_p1old
Higher nov 2008_p1oldybamary
 
Advanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIAdvanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIDr. Volkan OBAN
 
1.3 solving equations
1.3 solving equations1.3 solving equations
1.3 solving equationsmath260
 
3 algebraic expressions y
3 algebraic expressions y3 algebraic expressions y
3 algebraic expressions ymath266
 

What's hot (20)

Promise
PromisePromise
Promise
 
Bc0039
Bc0039Bc0039
Bc0039
 
20170509 rand db_lesugent
20170509 rand db_lesugent20170509 rand db_lesugent
20170509 rand db_lesugent
 
Algorithm Design and Analysis - Practical File
Algorithm Design and Analysis - Practical FileAlgorithm Design and Analysis - Practical File
Algorithm Design and Analysis - Practical File
 
関数潮流(Function Tendency)
関数潮流(Function Tendency)関数潮流(Function Tendency)
関数潮流(Function Tendency)
 
learn you some erlang - chap0 to chap2
learn you some erlang - chap0 to chap2learn you some erlang - chap0 to chap2
learn you some erlang - chap0 to chap2
 
Ciklum net sat12112011-alexander fomin-expressions and all, all, all
Ciklum net sat12112011-alexander fomin-expressions and all, all, allCiklum net sat12112011-alexander fomin-expressions and all, all, all
Ciklum net sat12112011-alexander fomin-expressions and all, all, all
 
learn you some erlang - chap3 to chap5
learn you some erlang - chap3 to chap5learn you some erlang - chap3 to chap5
learn you some erlang - chap3 to chap5
 
Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語
 
Millionways
MillionwaysMillionways
Millionways
 
Array notes
Array notesArray notes
Array notes
 
Functional Patterns for the non-mathematician
Functional Patterns for the non-mathematicianFunctional Patterns for the non-mathematician
Functional Patterns for the non-mathematician
 
10.5 more on language of functions x
10.5 more on language of functions x10.5 more on language of functions x
10.5 more on language of functions x
 
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFGo vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoF
 
Higher nov 2008_p1old
Higher nov 2008_p1oldHigher nov 2008_p1old
Higher nov 2008_p1old
 
Mosaic plot in R.
Mosaic plot in R.Mosaic plot in R.
Mosaic plot in R.
 
Advanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIAdvanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part II
 
Intoduction to php arrays
Intoduction to php arraysIntoduction to php arrays
Intoduction to php arrays
 
1.3 solving equations
1.3 solving equations1.3 solving equations
1.3 solving equations
 
3 algebraic expressions y
3 algebraic expressions y3 algebraic expressions y
3 algebraic expressions y
 

Similar to Haskell Tour (Part 2)

Math resources trigonometric_formulas
Math resources trigonometric_formulasMath resources trigonometric_formulas
Math resources trigonometric_formulasEr Deepak Sharma
 
Math resources trigonometric_formulas class 11th and 12th
Math resources trigonometric_formulas class 11th and 12thMath resources trigonometric_formulas class 11th and 12th
Math resources trigonometric_formulas class 11th and 12thDeepak Kumar
 
Class 10: Abstracting Procedures
Class 10: Abstracting ProceduresClass 10: Abstracting Procedures
Class 10: Abstracting ProceduresDavid Evans
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212Mahmoud Samir Fayed
 
Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!priort
 
Introduction to Recursion (Python)
Introduction to Recursion (Python)Introduction to Recursion (Python)
Introduction to Recursion (Python)Thai Pangsakulyanont
 
Vii ch 1 integers
Vii  ch 1 integersVii  ch 1 integers
Vii ch 1 integersAmruthaKB2
 
TypeLevel Summit
TypeLevel SummitTypeLevel Summit
TypeLevel SummitLuca Belli
 
Truth, deduction, computation lecture g
Truth, deduction, computation   lecture gTruth, deduction, computation   lecture g
Truth, deduction, computation lecture gVlad Patryshev
 
On Triplet of Positive Integers Such That the Sum of Any Two of Them is a Per...
On Triplet of Positive Integers Such That the Sum of Any Two of Them is a Per...On Triplet of Positive Integers Such That the Sum of Any Two of Them is a Per...
On Triplet of Positive Integers Such That the Sum of Any Two of Them is a Per...inventionjournals
 
Feb 22. Exercise 6
Feb 22. Exercise 6Feb 22. Exercise 6
Feb 22. Exercise 6ste ve
 
Assessments for class xi
Assessments  for class  xi Assessments  for class  xi
Assessments for class xi indu psthakur
 

Similar to Haskell Tour (Part 2) (20)

Integers
IntegersIntegers
Integers
 
Math resources trigonometric_formulas
Math resources trigonometric_formulasMath resources trigonometric_formulas
Math resources trigonometric_formulas
 
Math resources trigonometric_formulas class 11th and 12th
Math resources trigonometric_formulas class 11th and 12thMath resources trigonometric_formulas class 11th and 12th
Math resources trigonometric_formulas class 11th and 12th
 
economics
economicseconomics
economics
 
Class 10: Abstracting Procedures
Class 10: Abstracting ProceduresClass 10: Abstracting Procedures
Class 10: Abstracting Procedures
 
Ch04
Ch04Ch04
Ch04
 
Complex numbers
Complex numbersComplex numbers
Complex numbers
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212
 
Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!
 
Appendex
AppendexAppendex
Appendex
 
Introduction to Recursion (Python)
Introduction to Recursion (Python)Introduction to Recursion (Python)
Introduction to Recursion (Python)
 
Vii ch 1 integers
Vii  ch 1 integersVii  ch 1 integers
Vii ch 1 integers
 
TypeLevel Summit
TypeLevel SummitTypeLevel Summit
TypeLevel Summit
 
Truth, deduction, computation lecture g
Truth, deduction, computation   lecture gTruth, deduction, computation   lecture g
Truth, deduction, computation lecture g
 
On Triplet of Positive Integers Such That the Sum of Any Two of Them is a Per...
On Triplet of Positive Integers Such That the Sum of Any Two of Them is a Per...On Triplet of Positive Integers Such That the Sum of Any Two of Them is a Per...
On Triplet of Positive Integers Such That the Sum of Any Two of Them is a Per...
 
CH04.ppt
CH04.pptCH04.ppt
CH04.ppt
 
Feb 22. Exercise 6
Feb 22. Exercise 6Feb 22. Exercise 6
Feb 22. Exercise 6
 
Statistical Inference Using Stochastic Gradient Descent
Statistical Inference Using Stochastic Gradient DescentStatistical Inference Using Stochastic Gradient Descent
Statistical Inference Using Stochastic Gradient Descent
 
Statistical Inference Using Stochastic Gradient Descent
Statistical Inference Using Stochastic Gradient DescentStatistical Inference Using Stochastic Gradient Descent
Statistical Inference Using Stochastic Gradient Descent
 
Assessments for class xi
Assessments  for class  xi Assessments  for class  xi
Assessments for class xi
 

Recently uploaded

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Haskell Tour (Part 2)