Stateモナドの解説 前編
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Stateモナドの解説 前編

on

  • 2,359 views

 

Statistics

Views

Total Views
2,359
Views on SlideShare
2,359
Embed Views
0

Actions

Likes
3
Downloads
42
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Stateモナドの解説 前編 Presentation Transcript

  • 1. State 2009 5 31 id:hiratara
  • 2. • • State
  • 3. • URI Comparable Interface Comparable URI
  • 4. (1)
  • 5. Bool length Float fst Integer take MyType zip (Int, Bool) myfunc [Char] id Maybe String ... Int → Int → Int ...
  • 6. Bool length Float fst Integer take MyType zip (Int, Bool) myfunc [Char] id Maybe String ... Int → Int → Int ...
  • 7. Bool length Float fst Integer take MyType zip (Int, Bool) myfunc [Char] id Maybe String ... Int → Int → Int ...
  • 8. id f -> f quot;abcquot; [Char] id head [Char] -> [Char] Char id length take Int id
  • 9. id f -> f quot;abcquot; [Char] id head [Char] → [Char] Char id length take Int id
  • 10. (2)
  • 11. : Maybe [Char] Maybe [Char] Maybe length liftM length Maybe Int Maybe Int
  • 12. [] [Char] [ [Char] ] [] length liftM length [] Int [ Int ]
  • 13. [] [Char] [] [Char] [ [Char] ] [] length liftM length [] Int [ Int ]
  • 14. liftM Maybe [] [Char] [ [Char] ] [] length liftM length [] Int [ Int ]
  • 15. (3) return
  • 16. : Maybe return [Char] Maybe [Char] return Int Maybe Int
  • 17. [] return [Char] [ [Char] ] return Int [ Int ]
  • 18. return State return [Char] State [Char] return Bool State Bool return MyType State MyType return IO String State (IO String)
  • 19. (4) (>>=)
  • 20. Maybe [Char] Maybe [Char] func Int Maybe Int Maybe
  • 21. (>>=) Maybe [Char] Maybe [Char] (>>=) func (=<<) func Int Maybe Int Maybe
  • 22. State (>>=) [Char] State [Char] func1 (=<<) func1 (>>=) Int State Int func2 (=<<) func2 MyType State MyType
  • 23. return IO [Char] IO [Char] length return Int IO Int
  • 24. IO [Char] IO [Char] return . length length return Int IO Int
  • 25. (>>=) liftM IO [Char] (>>=) IO [Char] return . length length (=<<) $ return . length return Int IO Int
  • 26. • • return • (>>=)
  • 27. • • • State
  • 28. • Haskell Kleisli triple Monad • Kleisli triple Monad • Kleisli triple liftM ( Monad )