Skip to content

Instantly share code, notes, and snippets.

@LottieVixen
Created July 30, 2023 20:22
Show Gist options
  • Save LottieVixen/689239b1e9d11b3672cb7d0545a5cfcf to your computer and use it in GitHub Desktop.
Save LottieVixen/689239b1e9d11b3672cb7d0545a5cfcf to your computer and use it in GitHub Desktop.
function map(f a) { //missing a seperator here
function map(f, a) { //the correct line
const result = new Array(a.length);
for (let i = 0; i < a.length; i++) {
result[i] = f(a[i]) //missing a line terminator/seperator
result[i] = f(a[i]); //not missing it
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment