Fill remaining length of array with falsy values using Ramda

Viewed 968

I have an array of arrays that looks like this:

const difficulties = [
  [true, true],
  [true],
  [true, true, true],
  [true]
]

What I’d like to do is to perform a transform on the array using Ramda, so that each of the sub-arrays is filled up with false, looking like this:

[
  [true, true, false],
  [true, false, false],
  [true, true, true],
  [true, false, false]
]

How would I go about doing this?

3 Answers
Related