These are chat archives for ramda/ramda

16th
Jan 2018
Francisco
@franciscotln
Jan 16 2018 10:22

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

const sorted = R.sort(R.gt, 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
https://orig00.deviantart.net/a93e/f/2009/103/5/3/the_badass_triangle_by_demonsul.png
@GantMan :arrow_heading_up:
Gant Laborde
@GantMan
Jan 16 2018 15:19
Bahahahaha
Francisco, you're my new favorite person
Why does that image even exist, and how did you find it?
Are
@are1000
Jan 16 2018 15:22
Google bad triangle :P
Gant Laborde
@GantMan
Jan 16 2018 15:36
Lots of Adema and Illuminati - I knew they were behind this!
Francisco
@franciscotln
Jan 16 2018 16:02
:D