Journey to the Heart of the For-Yield

Kelsey Gilmore-Innis
http://nerd.kelseyinnis.com
@kelseyinnis

Sunday, October 20, ...
VAN
Sunday, October 20, 13
Sunday, October 20, 13
What have you done for me lately?
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
flatten compose map

flatMap
Sunday, October 20, 13
flatMap!

Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Enter Option

Sunday, October 20, 13
Enter Option

Sunday, October 20, 13
Enter Option

blergh!
Sunday, October 20, 13
blergh.
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Smokey, this is not ‘Nam.
There are rules.

Sunday, October 20, 13
the

Sunday, October 20, 13

word
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Sunday, October 20, 13
Other m-words
•Iteratee
•Reader
•Writer
•State
•IO

Sunday, October 20, 13
But, but...
•I don’t wanna fail fast!
•|@|
•Chocolate in my peanut butter? Peanut
butter in my chocolate?
•.toSeq, monad t...
Sunday, October 20, 13
Upcoming SlideShare
Loading in...5
×

Journey to the Heart of the For-Yield

6,971

Published on

Options and IOs and Iteratees, oh my! If you've poked around at Scala you've seen it--the ubiquitous for-comprehension sprinkled through idiomatic Scala code. As it turns out, what looks like a bit of syntactic sugar to ease prosaic list manipulation is actually a super powerful structure for abstracting away all kinds of common operations in a safe and maintainable way. It allows you to take full advantage of type safety and pushes the work of setting up boilerplate to the compiler. We'll break down exactly what's going on in a for-comprehension and explore some of the wild and wonderful structures that can be used within one. You'll leave with a deeper understanding of the real-world benefits of functional programming. Or, to put it another way:

for {
attendees <-><-> attendee }
yourFpKnowledge <- you.knowledgeOfFunctionalProgramming getOrElse beginner
} yield {
expand(yourFpKnowledge)
}

Published in: Technology, Self Improvement
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,971
On Slideshare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Journey to the Heart of the For-Yield

  1. 1. Journey to the Heart of the For-Yield Kelsey Gilmore-Innis http://nerd.kelseyinnis.com @kelseyinnis Sunday, October 20, 13
  2. 2. VAN Sunday, October 20, 13
  3. 3. Sunday, October 20, 13
  4. 4. What have you done for me lately? Sunday, October 20, 13
  5. 5. Sunday, October 20, 13
  6. 6. Sunday, October 20, 13
  7. 7. Sunday, October 20, 13
  8. 8. Sunday, October 20, 13
  9. 9. Sunday, October 20, 13
  10. 10. Sunday, October 20, 13
  11. 11. Sunday, October 20, 13
  12. 12. Sunday, October 20, 13
  13. 13. Sunday, October 20, 13
  14. 14. Sunday, October 20, 13
  15. 15. Sunday, October 20, 13
  16. 16. Sunday, October 20, 13
  17. 17. Sunday, October 20, 13
  18. 18. flatten compose map flatMap Sunday, October 20, 13
  19. 19. flatMap! Sunday, October 20, 13
  20. 20. Sunday, October 20, 13
  21. 21. Sunday, October 20, 13
  22. 22. Sunday, October 20, 13
  23. 23. Sunday, October 20, 13
  24. 24. Sunday, October 20, 13
  25. 25. Sunday, October 20, 13
  26. 26. Sunday, October 20, 13
  27. 27. Enter Option Sunday, October 20, 13
  28. 28. Enter Option Sunday, October 20, 13
  29. 29. Enter Option blergh! Sunday, October 20, 13
  30. 30. blergh. Sunday, October 20, 13
  31. 31. Sunday, October 20, 13
  32. 32. Sunday, October 20, 13
  33. 33. Sunday, October 20, 13
  34. 34. Smokey, this is not ‘Nam. There are rules. Sunday, October 20, 13
  35. 35. the Sunday, October 20, 13 word
  36. 36. Sunday, October 20, 13
  37. 37. Sunday, October 20, 13
  38. 38. Sunday, October 20, 13
  39. 39. Sunday, October 20, 13
  40. 40. Sunday, October 20, 13
  41. 41. Sunday, October 20, 13
  42. 42. Sunday, October 20, 13
  43. 43. Other m-words •Iteratee •Reader •Writer •State •IO Sunday, October 20, 13
  44. 44. But, but... •I don’t wanna fail fast! •|@| •Chocolate in my peanut butter? Peanut butter in my chocolate? •.toSeq, monad transformers •It’s inside out! •traverse & sequence Sunday, October 20, 13
  45. 45. Sunday, October 20, 13
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×