Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Make your programs Free

3 474 vues

Publié le

"Make your programs free" presented at Scala Matsuri

Publié dans : Logiciels
  • Identifiez-vous pour voir les commentaires

Make your programs Free

  1. 1. Make your programs Free Pawel Szulc @rabbitonweb
  2. 2. Free Monads!
  3. 3. Free[S, A]
  4. 4. Free[S, A] This is the program
  5. 5. Free[S, A] This is the language
  6. 6. Free[S, A] This is the type of a value it will produce (once it is run)
  7. 7. Let’s see it in action! (aka Demo) https://github.com/rabbitonweb/make-your-programs-free
  8. 8. Usage of Scalaz’s Task class Task[+A](val get: Future[Throwable / A]) { .. }
  9. 9. Usage of Scalaz’s Task class Task[+A](val get: Future[Throwable / A]) { .. } def foo(input: Int): Future[String]
  10. 10. Usage of Scalaz’s Task class Task[+A](val get: Future[Throwable / A]) { .. } def foo(input: Int): Future[String] def bar(intput: Int): Task[String]
  11. 11. Usage of Scalaz’s Task class Task[+A](val get: Future[Throwable / A]) { .. } def foo(input: Int): Future[String] def bar(intput: Int): Task[String] val f: Future[String] = foo(10) val b: Task[String] = bar(20) val s1: String = b.unsafePerformSync
  12. 12. Let’s see it in action! (aka Demo) https://github.com/rabbitonweb/make-your-programs-free
  13. 13. Input - Output
  14. 14. Logging
  15. 15. Can we have both?
  16. 16. Manipulate Account
  17. 17. Introducing: low level machinery
  18. 18. Compiling down to lower-level language
  19. 19. Free[S, A]
  20. 20. But I want to see a real world example! https://github.com/quasar-analytics/quasar
  21. 21. Thank you for watching! Pawel Szulc @rabbitonweb
  22. 22. Thank you for watching! Pawel Szulc @rabbitonweb paul.szulc@gmail.com
  23. 23. Thank you for watching! Pawel Szulc @rabbitonweb paul.szulc@gmail.com http://rabbitonweb.com
  24. 24. Thank you for watching! Pawel Szulc @rabbitonweb paul.szulc@gmail.com http://rabbitonweb.com https://github.com/rabbitonweb/make-your-programs-free

×