Functional programming has a lot of benefits. Within julia many know about immutability, however who has used monads? Monads capsulate context or side-effects and are one of the corner stones of classical functional programming. Take a look what monads are and how DataTypesBasic.jl and TypeClasses.jl implemented them in Julia.
Monads capsulate context or side-effects and are one of the corner stones of classical functional programming. It turns out that Julia with its Union types, Hierarchy and multiple dispatch allows for many ways to implement these concepts. After several iterations I converged at one representation which is both quite minimal and very powerful.
This talk will give you an introduction to monads, especially to Option, Try, Either, and ContextManager, and how to implement them in julia. We will take a look at both DataTypesBasic.jl https://github.com/JuliaFunctional/DataTypesBasic.jl and TypeClasses.jl https://github.com/JuliaFunctional/TypeClasses.jl, two packages of mine which implement some standard monads for Julia.