0.0
No commit activity in last 3 years
No release in over 3 years
EasyMonads is a gem for Ruby that provides a simple implementation of monads. It also provides a useful example of monads in the form of Option (similar to Scala's Option) which provides Some and None classes. Developement for EasyMonads is sponsored by BookRenter.com and it is released under an MIT-style license
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.21
~> 1.6.4
>= 0
~> 0.9.11
>= 2.4.2
~> 2.11.3
 Project Readme

Easy Monads - Monads for Ruby, with Option

EasyMonads::Monadic

Created to provide an easy implementation of monads for Ruby. Monads are practical and easy to grok (or at least they should be). Here is an excellent tutorial that explains some of the benefits of monads: monads-are-not-metaphors.

EasyMonads::Option

Inspiration for easy_monads largely comes from Scala's Option, and Option is implemented here. The goal of EasyMonad::Option isn't to mirror Scala's implementation, but it tries to follow the general pattern. If you are a Scala fan and are looking for Scala semantics in Ruby applications, you should have a look at rumonade in addition to easy_monads. If you are just looking for an implentation of Option for Ruby, EasyMonads::Option is an easy choice.

To add Option to the Object class:

require 'easy_monads'
EasyMonads.option_everywhere!

Credits

Easy Monads is maintained by Stephen Sloan and is funded by BookRenter.com. We are experimenting with monads at BookRenter and hope that you find this useful.

BookRenter.com Logo

Copyright

Copyright (c) 2011 Stephen Sloan, Bookrenter.com. See LICENSE.txt for further details.