SlideShare ist ein Scribd-Unternehmen logo
1 von 137
Downloaden Sie, um offline zu lesen
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...

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Kürzlich hochgeladen (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Haskell Tour (Part 2)