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

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,427
On Slideshare
2,427
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
43
Comments
0
Likes
3

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
  • <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 />

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 )