x/rambda/prevIndex.js
1234export function prevIndex(index, list){ return index === 0 ? list.length - 1 : index - 1}