ramda / ramda-fantasy

:ram::sparkles: Fantasy-Land compatible types for easy integration with Ramda.js
MIT License
1.5k stars 95 forks source link

Create a join method #145

Closed idcmardelplata closed 7 years ago

idcmardelplata commented 7 years ago

I think it would be good for the types to have a join method. Here is a simple implementation.

Obviously used like this:

Maybe.prototype.join = getJoinForTypes(Maybe);
IO.prototype.join = getJoinForTypes(IO)
etc...
davidchambers commented 7 years ago

Are you imagining something like join :: Chain m => m (m a) -> m a, @idcmardelplata?

idcmardelplata commented 7 years ago

As it is, I do not understand why the types do not have method join.

davidchambers commented 7 years ago

join can be derived from chain. In my view we're better off defining join once and for all than having dozens of authors add join methods to their algebraic data types.

idcmardelplata commented 7 years ago

@davidchambers As such, I think the same as you