Advertisement

Make your programs Free

Scala Developer at BLStream
Feb. 25, 2017
Advertisement

More Related Content

Advertisement
Advertisement

Make your programs Free

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