Is there a clever way to transform an array into a dictionary of sub-arrays using specified indices in Ramda?
const originalArray = ["A", "B", "C", "D", "E"];
const indicesToSplit = [0, 0, 1, 0, 3];
// Desired output:
R.split(indicesToSplit, originalArray) // { "0": ["A", "B", "D"], "1": ["C"], "3": ["E"] }
Looking for an elegant solution using Ramda library. Any ideas?