x/rambda/nth.js
12345678910export function nth(index, list){ if (arguments.length === 1) return _list => nth(index, _list) const idx = index < 0 ? list.length + index : index return Object.prototype.toString.call(list) === '[object String]' ? list.charAt(idx) : list[ idx ]}