0
Upcoming SlideShare
×

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.
Standard text messaging rates apply

5,544

Published on

Published in: Technology, Education
7 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

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

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
• 4. 10 !!
• 10. (OO) = +
• 11. (OO) = +
• 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 ( )
• 30. OOP(OO)
• 32. Y
• 33. (OO) = +
• 34. ( )( )
• 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