These are chat archives for ramda/ramda

Jan 2018
Guido Schmitz
Jan 15 2018 07:27

I’m writing a blog post on transducers and just finished my first draft. I’m looking for people that could check the content and grammar (not a native speaker). It would really help me out creating good content for other people in the community.

I've also included a section about RamdaJs :).


Comment in the file or add suggestions. Thanks a lot!

Gant Laborde
Jan 15 2018 14:54
I had a friend of mine asked for a function that returns true if a single false is found in an array. Here's my solution, feedback welcome:
Jan 15 2018 15:51
If I understood well, from the description he gave in the link this should be any
any(equals(false))([true, true, false])  // => true
any(equals(false))([true, true, true])  // => false
any(equals(false))([true, false, false])  // => true
any(equals(false))([false, false, false])  // => true
any(equals(false))([])  // => false
Gant Laborde
Jan 15 2018 16:49
Francisco, you're right. I'm always learning new functions that are better than what I make, hahahaha
Thanks for the best solution!
Jan 15 2018 16:50
@franciscotln Nice solve. I can’t get over how much like a perfect sentence you can get with Ramda/FP
Gant Laborde
Jan 15 2018 17:30
by the way I like solving beginner JS exercises with Ramda. Would sharing my solution/asking for help be available here?
Jan 15 2018 18:37
When I have some time I can take a look, just ping me also :-)
@GantMan BTW, speaking of when, there is a R.when which is equivalent to what you've written:
    const specialCase = R.ifElse(

const specialCase2 = R.when(divByC, divByCD);
you don't need the placeholder in this case const isZero = R.equals(R.__, 0), just const isZero = R.equals(0);
I'm referring to your file, off course :D
Jan 15 2018 19:30

@isidorosp if you want a pointfree function then:

const parseData = R.pipe(
  R.converge(, [ R.pipe(R.head, R.zipObj), R.tail ]),

Ah nice one...the solution I was trying to come up with ha. Have never thought to use map as a converging function, clever.

Gant Laborde
Jan 15 2018 23:40
@franciscotln - I updated that exercise with your feedback, which is awesome because now I have a record of how to do it better
Open for feedback, here's another solution: