I want to take an array [1, 2, 3] and return [1, 2, 3, 1].
[1, 2, 3]
[1, 2, 3, 1]
I\'m using Ramda, and I can get the desired result like this:
const
The S combinator is useful here:
S.S(S.C(R.append), R.head, [1, 2, 3]); // => [1, 2, 3, 1]