These are chat archives for ramda/ramda

Jan 2018
Jan 16 2018 10:22 UTC

I'd just add that you can use in the sort function

const sorted = R.sort(, sides);

and that you can use propEq to check the array's length

const isEquilateral = R.pipe(R.uniq, R.propEq('length', 1));
const isIsosceles = R.pipe(R.uniq, R.propEq('length', 2));

Looks fine for me although I don't like working with indices sorted[0] + sorted[1] <= sorted[2]but if we want to work this out via pipe it will be a long one : -)

I was just trying to visualise a bad triangle according to your error message
@GantMan :arrow_heading_up:
Gant Laborde
Jan 16 2018 15:19 UTC
Francisco, you're my new favorite person
Why does that image even exist, and how did you find it?
Jan 16 2018 15:22 UTC
Google bad triangle :P
Gant Laborde
Jan 16 2018 15:36 UTC
Lots of Adema and Illuminati - I knew they were behind this!
Jan 16 2018 16:02 UTC