Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const map = (fn, [x, ...xs]) => (
(x === undefined && xs.length ==0)? []
:[f(x),...map(f,xs)]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment