Re:Monads in Elixir
by zabi_rauf on Sunday May 31, 2015 @05:55PM
(#9635718)
I've seen the same video before i knew what a monad was, it helped me in understanding the use case of monad and ultimately monad. Monad is just a generalization of that particular use case. Some resources that helped me in understanding monads
So its been not just one resource but multiple resource before it hit me that it was such a simple concept. So i would suggest to go over them (in order) and also look at other resources (mentioned by others).
Re:Monads in Elixir
by kaeluka on Sunday May 31, 2015 @12:21PM
(#9634595)
This is an example where you'd really want static types for ergonomics. Having to name the monad explicitly does not allow to write generic code (i.e, instead of saying `Maybe.return` to just say `return).
Re:Monads in Elixir
by LesZedCB on Sunday May 31, 2015 @01:34PM
(#9634841)
Yes, in writing ruby during my day job, I often have conflicting feelings about dynamic typing. The other advantage would be being able to do real static analysis, I would love that.
Re:Monads in Elixir
by rozap on Sunday May 31, 2015 @05:13PM
(#9635573)
In Elixir you can annotate functions with type signatures and then use a tool like Dialyzer(1) to perform static analysis on the compiled bytecode. There is tooling that integrates with mix in Elixir called which makes this easy(2)
And a good resource if you don't would be..?
I enjoyed watching [1] last week so I suspect I have seen the concept, even if I don't grasp what's meant by a monad.
1. https://vimeo.com/113707214
1. Brian Beckman: Don't fear the Monad - https://www.youtube.com/watch?v=ZhuHCtR3xq8&feature=share
2. Functors, Applicatives, And Monads In Pictures - http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...
3. Three Useful Monads - http://adit.io/posts/2013-06-10-three-useful-monads.html
So its been not just one resource but multiple resource before it hit me that it was such a simple concept. So i would suggest to go over them (in order) and also look at other resources (mentioned by others).
But it's a good video, thanks.
1) http://www.erlang.org/doc/apps/dialyzer/dialyzer_chapter.htm... 2) https://github.com/jeremyjh/dialyxir