O slideshow foi denunciado.
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.

Make your programs Free

3.165 visualizações

Publicada em

"Make your programs free" presented at Scala Matsuri

Publicada em: Software
  • Dating for everyone is here: ❶❶❶ http://bit.ly/39mQKz3 ❶❶❶
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • Follow the link, new dating source: ❶❶❶ http://bit.ly/39mQKz3 ❶❶❶
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui

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

×