Earlier quoted context omitted.
>They're basically just containers that allow you to use side effects, hold state, etc... No, that is one use for Monads. A Monad is just something that has a bind (>>=) function and a return function.
> A Monad is just something that has a bind (>>=) function and a return function. You realise that this is the most useless description ever? While I'm sure it's right, it doesn't actually mean anything. Why's it a good abstraction for doing , better than any other abstraction? If it abstracts over a gazillion different things, why not have special-purpose abstractions like other languages (and thus probably make the…
Learn You a Haskell for Great Good (2008)
71–80 of 123 posts
Re: Learn You a Haskell for Great Good (2008)
#72Should I learn oCaml instead ? Looks appealing because companies like Facebook are using it create tools like Flow ( https://github.com/facebook/flow ).
Facebook is also creating tools with Haskell: https://github.com/facebook/Haxl My 2 cents: definitely _also_ learn OCaml down the line. But: - my pet peeve with OCaml is the lack of a builtin type for Unicode strings (the only other language still commonly used with this shortcoming is PHP), and this could be an issue if you plan to write some web app code that needs to be internationalized - OCaml is strict, Haskell…
Re: Learn You a Haskell for Great Good (2008)
#73Should I learn oCaml instead ? Looks appealing because companies like Facebook are using it create tools like Flow ( https://github.com/facebook/flow ).
That said, I agree with berdario that you should learn both languages instead of only one of them. There is lots of terminology that is shared between FP languages too so it shouldn't be very hard either.
Re: Learn You a Haskell for Great Good (2008)
#74What is a good online reference to learn about "Monads" for beginners? Someone posted a reference here on HN sometime ago but I lost it. Edit: The book was enjoyable and a delight to read, but I started struggling to keep up from Chapter 8. as it went into Monoids and Monads, I feel like I need to read other tutorials before coming back to it.
I highly recommend watching Tom Stuart's talk "Refactoring Ruby with Monads": https://www.youtube.com/watch?v=J1jYlPtkrqQ
Re: Learn You a Haskell for Great Good (2008)
#75Should I learn oCaml instead ? Looks appealing because companies like Facebook are using it create tools like Flow ( https://github.com/facebook/flow ).
Re: Learn You a Haskell for Great Good (2008)
#76What is a good online reference to learn about "Monads" for beginners? Someone posted a reference here on HN sometime ago but I lost it. Edit: The book was enjoyable and a delight to read, but I started struggling to keep up from Chapter 8. as it went into Monoids and Monads, I feel like I need to read other tutorials before coming back to it.
http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...
Re: Learn You a Haskell for Great Good (2008)
#77Earlier quoted context omitted.
> A Monad is just something that has a bind (>>=) function and a return function. You realise that this is the most useless description ever? While I'm sure it's right, it doesn't actually mean anything. Why's it a good abstraction for doing , better than any other abstraction? If it abstracts over a gazillion different things, why not have special-purpose abstractions like other languages (and thus probably make the…
The point, I think, is that the original description leaves out the easiest monads, which makes learning about them a lot more difficult. See: List, Maybe, etc.
> A Monad is just something that has a bind (>>=) function and a return function.
?
(I know how they relate, but the above assertion is not a particularly helpful description of List and Maybe)
Re: Learn You a Haskell for Great Good (2008)
#78Earlier quoted context omitted.
Facebook is also creating tools with Haskell: https://github.com/facebook/Haxl My 2 cents: definitely _also_ learn OCaml down the line. But: - my pet peeve with OCaml is the lack of a builtin type for Unicode strings (the only other language still commonly used with this shortcoming is PHP), and this could be an issue if you plan to write some web app code that needs to be internationalized - OCaml is strict, Haskell…
Is there a free, light tutorial book like "For Great Good" for OCaml?
Re: Learn You a Haskell for Great Good (2008)
#79I'm currently working through this book. Overall it seems like a good introduction but I wish it had exercises at the end of each section. I learn best by working through specific problems.
Re: Learn You a Haskell for Great Good (2008)
#80What is a good online reference to learn about "Monads" for beginners? Someone posted a reference here on HN sometime ago but I lost it. Edit: The book was enjoyable and a delight to read, but I started struggling to keep up from Chapter 8. as it went into Monoids and Monads, I feel like I need to read other tutorials before coming back to it.
I recommend this to anybody who wants to learn about Haskell's important data types: https://wiki.haskell.org/Typeclassopedia