Outline
❏ What motivates usage of a Free monad?❏ What is a Free monad, how to use it?❏ Q&A from the Internet
What is Functional Programming?
● no assignment statements● no variables● once given a value, never change
What is Functional Programming?
● no assignment statements● no variables● once given a value, never change● no side-effects at all
What is Functional Programming?
● no assignment statements● no variables● once given a value, never change● no side-effects at all
What is Functional Programming?
● no assignment statements● no variables● once given a value, never change● no side-effects at all
“The functional programmer sounds rather like a mediæval monk, denying himself the pleasures of life in the hope that it will make him virtuous.”
Divide & conquer
SOFTWARE ENGINEERING NATO SCIENCE COMMITTEE Garmisch
Germany, 7th to 11th October 1968
Divide & conquer
SOFTWARE ENGINEERING NATO SCIENCE COMMITTEE Garmisch
Germany, 7th to 11th October 1968
Divide & conquer
SOFTWARE ENGINEERING NATO SCIENCE COMMITTEE Garmisch
Germany, 7th to 11th October 1968
“COMPLEXITY CONTROLLED BY HIERARCHICAL ORDERING OF FUNCTION AND VARIABILITY” by Edsger W. Dijkstra
Divide & conquer
SOFTWARE ENGINEERING NATO SCIENCE COMMITTEE Garmisch
Germany, 7th to 11th October 1968
“COMPLEXITY CONTROLLED BY HIERARCHICAL ORDERING OF FUNCTION AND VARIABILITY” by Edsger W. Dijkstra
http://homepages.cs.ncl.ac.uk/brian.randell/NATO/nato1968.PDF
Let’s see it in action!(aka Demo)
https://github.com/rabbitonweb/make-your-programs-free
Resources
● Stackless Scala With Free Monads○ http://blog.higher-order.com/assets/trampolines.pdf
● Data types a la carte○ http://www.cs.ru.nl/~W.Swierstra/Publications/DataTypesALaCarte.pdf
● Composable application architecture with reasonably priced monads○ https://www.youtube.com/watch?v=M258zVn4m2M
● Why the free monad isn’t free ○ https://www.youtube.com/watch?v=U0lK0hnbc4U (with disclaimer)
● Move Over Free Monads: Make Way for Free Applicatives!○ https://www.youtube.com/watch?v=H28QqxO7Ihc
● http://perevillega.com/understanding-free-monads ● http://www.haskellforall.com/2012/06/you-could-have-invented-free-monads.html
But I want to see a real world example!
https://github.com/quasar-analytics/quasar
Thank you for watching!
Pawel Szulc
@rabbitonweb
http://rabbitonweb.com
https://github.com/rabbitonweb/make-your-programs-free
Top Related