Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Próximos SlideShares
Carregando em…5
×

# Developers Summit 2015 - Scala Monad

1.569 visualizações

Developers Summit 2015の発表資料

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Seja o primeiro a comentar

### Developers Summit 2015 - Scala Monad

2. 2. Who Am I • Now: Dynalyst • Lang: Korean(30+ years)  Japanese(8+ years)  JAVA(8.2+ years)  Scala(a year) • AdTech: AMoAd DSP  CAA Reward
3. 3. What Dynalyst • Dynamic Retargeting + Analyst • ユーザーの趣味嗜好に適した広告配 信を行う国内初のスマートフォンに 特化したダイナミックリターゲティ ング広告
4. 4. Scala USAGE
5. 5. Today’s Talk • Monads in Scala Standard Library • How to use them
6. 6. Monad? • Effects on a value • Structure that represents computations defined as sequences of steps
7. 7. Monad? • Effects on a value  :unit • Structure that represents computations defined as sequences of steps  :flatMap
8. 8. Effects on a value • VALUE • MONAD(VALUE) • Option(VALUE),  List(VALUE),  Try(VALUE),  Future(VALUE)
9. 9. Sequencial Computations • X -> Y -> Z • M[X] -> M[Y] -> M[Z] f g f’ g’
10. 10. Behaviour • f = X => M[Y]  g = Y => M[Z]  • X -> M[X] -> M[Y]  • M[Y] -> M[Z] -> … unit flatMap flatMap flatMap
11. 11. Simple User DAO
12. 12. Option Effects on a Nullable Value (Some or None)
13. 13. Unit
14. 14. FlatMap
15. 15. Effects on a Nullable Value Some(User) or None
16. 16. Exception Safety?
17. 17. Try Effects on a Throwable Value (Success or Failure)
18. 18. Unit
19. 19. FlatMap
20. 20. Effects on a Nullable & Throwable Value Success(Some(User)) or  Success(None) or  Failure(throwable)