These are chat archives for ramda/ramda

20th
Jan 2017
diqye
@diqye2014
Jan 20 2017 00:18 UTC
IM is good
Jethro Larson
@jethrolarson
Jan 20 2017 00:52 UTC
Is there an mjoin?
Monad m => m (m a) -> m a
Jethro Larson
@jethrolarson
Jan 20 2017 01:26 UTC
I guess that's just R.chain(R.identity) kind of seems like a gap anyway
Scott Christopher
@scott-christopher
Jan 20 2017 02:15 UTC
@jethrolarson R.unnest is implemented as chain(identity)
syntaxErrorForbearer
@syntaxErrorForbearer
Jan 20 2017 02:19 UTC
hello world!
Francisco López
@donflopez
Jan 20 2017 10:17 UTC
Should ramda has a .notEquals function?
I see myself repeating complement(equals)
Denis Stoyanov
@xgrommx
Jan 20 2017 10:22 UTC
@donflopez make alias
Francisco López
@donflopez
Jan 20 2017 10:23 UTC
like const notEq = complement(equals)?
Denis Stoyanov
@xgrommx
Jan 20 2017 10:26 UTC
why not
Francisco López
@donflopez
Jan 20 2017 10:28 UTC
I'd have to do it in every module that I need it... or create a new utils module where put this kind of things... I was suggesting that if it is a common use for everyone why not include it in ramda? (Is it a common use?)
Denis Stoyanov
@xgrommx
Jan 20 2017 10:38 UTC
I think in Ramda we have too much reproducible methods via others. I think API of Ramda should be reduced.
@donflopez compose(not, predicate)
@donflopez I see no problem to use compose
Francisco López
@donflopez
Jan 20 2017 10:43 UTC
no! me neither, I use it... for those kind of cases https://github.com/CartoDB/tangram-carto/blob/master/src/basic/points.js#L94
but I think that an utilities library should has the most use cases covered
and that is a general use case for me
Mateusz Burzyński
@Andarist
Jan 20 2017 11:11 UTC
Isnt it just a simple function composition? You always end up with your needs and your utils. What makes it special to be included?
Francisco López
@donflopez
Jan 20 2017 14:22 UTC
There is nothing more special than being a common function (I think), you have workarounds, but why not be included as another fn in ramda?
dcmwong
@dcmwong
Jan 20 2017 15:22 UTC
I have an array of [Nothing(), “test”]. How can I filter out the Nothing so that I just have [“test”]
Aldwin Vlasblom
@Avaq
Jan 20 2017 15:35 UTC
@dcmwong Your list mixes types (Maybe a | String). I would recommend having the list contain a single type (Maybe String). So your list should look like: [Nothing(), Just("test")]. Probably you have a function which could return Nothing. This function should return Just(x) where x is the value it returns otherwise. Sanctuary has a function justs which would take that input and return ["test"]. I'm not sure what lib you are using for your Maybe, but it might have a similar function.
dcmwong
@dcmwong
Jan 20 2017 15:36 UTC
@Avaq I’m using ramda-fantasy for my Maybe
Aldwin Vlasblom
@Avaq
Jan 20 2017 15:40 UTC
@ram-bot
const justs = R.chain(Maybe.maybe([], R.of));
justs([Maybe.Nothing(), Maybe.Just("test")])
ram-bot
@ram-bot
Jan 20 2017 15:40 UTC
[ 'test' ]
Aldwin Vlasblom
@Avaq
Jan 20 2017 15:41 UTC
@dcmwong :point_up:
dcmwong
@dcmwong
Jan 20 2017 15:47 UTC
thanks @Avaq Just trying to work that into my solution
got it. I’m still getting used to wrapping everything up.
Shane Keulen
@SeeThruHead
Jan 20 2017 20:59 UTC
what happened to allUniq?
Brad Compton (he/him)
@Bradcomp
Jan 20 2017 23:24 UTC
@SeeThruHead ramda/ramda#1819