Skip to content

Instantly share code, notes, and snippets.

@MeetMartin
Created October 19, 2020 21:22
Show Gist options
  • Select an option

  • Save MeetMartin/bd54d944cdcb5aa2a1d6a044d43649a2 to your computer and use it in GitHub Desktop.

Select an option

Save MeetMartin/bd54d944cdcb5aa2a1d6a044d43649a2 to your computer and use it in GitHub Desktop.
const myList = [1, 2, 3];
const myChecker = a => a > 1; // filter only numbers larger than 1
const myMapper = a => a + 1; // make all numbers + 1
filterMap(myChecker, myMapper, myList); // => [3, 4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment