3 ms·
const map = (fn, [x, ...xs]) => (x === undefined) ? [] : [fn(x), ...map(fn, xs)]; This gives me the warm and fuzzies.
by jarcane 12y ago
const map = (fn, [x, ...xs]) => (x === undefined) ? [] : [fn(x), ...map(fn, xs)];
This gives me the warm and fuzzies.