const valueAt = (xs, i, acc=0) => { if (isEmpty(xs)) return null; return (i === acc) ? head(xs) : valueAt(tail(xs), i, acc + 1) };
const positionOf = (xs, x, acc=0) => { if (isEmpty(xs)) { return -1; } return (head(xs) === x) ? acc : positionOf(tail(xs), x, acc + 1); };
const reverse = (xs, acc=[]) => ( isEmpty(xs) ? acc : reverse(tail(xs), [head(xs)].concat(acc)) );