Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

join has the type `m (m a) -> m a`. That's the thing that really shows off the monoidal structure. People normally implement monads in terms of bind, but you can easily define join in terms of bind for any Monad: `join ma = ma >>= id`. So really, as long as you have a lawful instance of Monad written with bind the existence of join is your proof.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: