beefed up Ruby monad