Our Latest Discovery

Sep 24 2007   12:41PM GMT

Watch the Catsters on YouTube and learn about monads, math and functional programming

GuyPardon Guy Pardon Profile: GuyPardon

Ok, I admit it: calculus is now officially a decade in my past. Math, or “maths,” as the Brits put it, however, is very much in my present, considering the importance of algorithms to modern life. (For more on that, just review this thread on the growing public awareness of algorithms over on Slashdot.)

One mathematical concept that’s worth mastering is the monad. Monads, in the context of functional programming (as opposed to pure mathematics), are a useful way of expressing input/output (I/O) operations and changes in state without using language features that introduce side effects. Monads are useful in any situation where a programmer wants to carry out a purely functional computation while a related computation is performed externally. Monad also, by the way, was the codename for Window’s Powershell before it was launched, a nod to the use of monads in that highly functional scripting language.

Make sense?

If that explanation still doesn’t suffice to explain what a monad is, never fear: The Catsters have posted a series of videos on YouTube to help you master the concept!

Monads 1: An introduction to monads, including the definition and a look at the monoid monad.

[kml_flashembed movie="http://youtube.com/v/9fohXBj2UEI" width="425" height="350" wmode="transparent" /]

Monads 2: Continuation of the monoid monad example and introduction of the category monad.

[kml_flashembed movie="http://youtube.com/v/Si6_oG7ZdK4" width="425" height="350" wmode="transparent" /]

Monads 3: The definition of algebras for monads. The example of monoids as algebras for the monoid monad.

[kml_flashembed movie="http://youtube.com/v/eBQnysX7oLI" width="425" height="350" wmode="transparent" /]
Monads 4: An appendix to Monads 3: more on monoids as algebras for the monoid monad.

[kml_flashembed movie="http://youtube.com/v/uYY5c1kkoIo" width="425" height="350" wmode="transparent" /]
Monads 5: Morphisms between algebras and the category of algebras. A first look at the question of monadicity.

[kml_flashembed movie="http://youtube.com/v/Cm-O_ZWEIGY" width="425" height="350" wmode="transparent" /]
If, after viewing, you’re still a bit curious about monads and programming, try Noel Winstanley’s “What the hell are Monads?” MenTaLguY also explains monads in the context of Ruby, escaping the need to work with Haskell.

Hat tip goes to the n-Category Cafe for the discovery!

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: