These are chat archives for ramda/ramda

4th
Feb 2019
Julien BONNIN
@Powerplex
Feb 04 21:40
Hello :) Small question, is there any method inside ramda so I don't have to write this ? :
const equalsWith = curry((predicate, a, b) => predicate(a) === predicate(b))
Ben Briggs
@ben-eb
Feb 04 22:01
@Powerplex R.eqBy :)
Julien BONNIN
@Powerplex
Feb 04 22:10
oooooh :) thanks, i was filtering on 'equals' in the doc :)
Ben Briggs
@ben-eb
Feb 04 22:11
You're welcome!
Julien BONNIN
@Powerplex
Feb 04 22:12
I am working for ramda adoption in my company (30 front-end developers), and making a few examples for them :)
Ben Briggs
@ben-eb
Feb 04 22:12
Interesting to note that eqBy is a specialisation of the psi combinator (on in haskell)
const psi = curry((f, g, x, y) => g(f(x), f(y)));
Julien BONNIN
@Powerplex
Feb 04 22:13
oh okay, and g is the equals method ?
Ben Briggs
@ben-eb
Feb 04 22:14
Yep!
Julien BONNIN
@Powerplex
Feb 04 22:14
double higher order function :D
Ben Briggs
@ben-eb
Feb 04 22:14
I'm really digging combinators at the moment heh :)
Julien BONNIN
@Powerplex
Feb 04 22:14
I'll look into that more ! thanks
Ben Briggs
@ben-eb
Feb 04 22:15
For instance W combinator (or R.unnest) allows us to define a pointfree square function - unnest(multiply)
Julien BONNIN
@Powerplex
Feb 04 22:17
Interesting. Why are they named just with a capital letter ? some kind of convention ?