Ramda - Forming a string based on array of word positions
This is a great question.

I found no easy Ramda functional way to solve this, but you could just use a forEach approach. I find it easier to read.

const {forEachObjIndexed, forEach} = R;

const song = {
  "99": [0, 7],
  "bottles": [1, 8],
  "of": [2, 9],
  "beer": [3, 10],
  "on": [4],
  "the": [5],
  "wall": [6]
};

let words = [];

forEachObjIndexed((indexes, word) =&gt; forEach(idx =&gt; words[idx] = word, indexes), song);

console.log(words.join(' '));