Your SlideShare is downloading. ×
0
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Programming haskell chapter10
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Programming haskell chapter10

5,544

Published on

スタートHaskell 第5回資料

スタートHaskell 第5回資料

Published in: Technology, Education
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,544
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
18
Comments
0
Likes
7
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. 10 ruicc.rail@gmail.com
    • 2. (Ruichi Kousuke)@ruicchttp://d.hatena.ne.jp/ruicc
    • 3. Haskell
    • 4. 10 !!
    • 5. Haskell Advent Calendar Haskell Advent Calender 2 http://partake.in/events/eaea52c2-61ef-46d5- a855-3a2dde459e3a
    • 6. Haskell Advent Calendar2011 2 ruicc.rail@gmail.com
    • 7. A HaskellBABA ...
    • 8. (OO)(OO) (Haskell) (Haskell) 10
    • 9. (OO) (Haskell)(OO) (Haskell)
    • 10. (OO) = +
    • 11. (OO) = +
    • 12. (OO) (Haskell)(OO) (Haskell) Haskell
    • 13. (Algebraic Data Type)(Set)
    • 14. Tuple ( )
    • 15. orBool True or False
    • 16. datadata IntOrSome a = MkInt Int | MkA a
    • 17. datadata IntOrSome a = MkInt Int | MkA a (OO )
    • 18. data typedata IntOrSome a = MkInt Int | MkA atype IntOrStr = IntOrSome String
    • 19. ( )add :: Int -> Int -> Intadd a b = a + b
    • 20. (OO)class IntAndStr { private Int field1; private String field2; public IntAndStr (Int i, String s) { field1 = i; field2 = s; }}a = new IntAndStr(42, “aiueo”);
    • 21. Haskelldata IntAndStr = MkIS Int Stringlet a = MkIS 42 “aiueo”
    • 22. (OO)
    • 23. Haskelldata Bool = False | Truedata Maybe a = Nothing | Just adata Either a b = Left a | Right b
    • 24. (OO)
    • 25. Haskelldata List a = Nil | Cons a (List a)data Tree a = Leaf a | Node (Tree a) (Tree a)
    • 26. (OO) ..
    • 27. FAQQ: Haskell private A1: Python dis A2: Javascript ( )
    • 28. Haskell private( ) Haskell private module
    • 29. Haskell private:wheremodule
    • 30. OOP(OO)
    • 31. :Haskell
    • 32. Y
    • 33. (OO) = +
    • 34. ( )( )
    • 35. Haskell
    • 36. FAQC++ Python Y Y Haskell
    • 37. Haskell ( )C++,Python C++ : Python : C3
    • 38. FAQ Scala Trait scalaz TraitHaskell
    • 39. classbuilt-in Eqclass Eq a where (==), (/=) :: a -> a -> Bool
    • 40. classclass Eq a where (==), (/=) :: a -> a -> Bool
    • 41. class instance class instance Eqclass Eq a where (==), (/=) :: a -> a -> Bool MyTypeinstance Eq MyType where x == y = ... -- (==) :: MyType -> MyType -> Bool
    • 42. class Eqclass (Eq a) => Ord a where (<=) :: a -> a -> Bool Ord ...
    • 43. classclass (Eq a, Show a) => Num a where (+) :: a -> a -> a ... Show Eq Num
    • 44. Read Show instance Typeable Bounded Ix Enum Data Ord Eqinstance MyType
    • 45. derivingdata derivingdata MyType a b c = A a | B b | C c deriving (Eq, Ord, Show, Read) Read Show Ord Eq MyType
    • 46. deriving FAQ URL: http://www.haskell.org/ghc/docs/7.2.2/html/users_guide/deriving.html
    • 47. HaskellHaskell
    • 48. instance Eq (Maybe Int) :: *instance Monad Maybe :: * -> *
    • 49. Monad, Functor, Applicative

    ×