Skip to content

Instantly share code, notes, and snippets.

@fa7ad
Created February 7, 2020 14:33
Show Gist options
  • Save fa7ad/1cc08816f7c4addffd5d84309a82244f to your computer and use it in GitHub Desktop.
Save fa7ad/1cc08816f7c4addffd5d84309a82244f to your computer and use it in GitHub Desktop.
transducer__medium
const data = ['apple', 'banana', 'orange', 'strawberry']
const isNotBerry = fruit => !/berry/i.test(fruit)
const fruitsThatArentBerries = data.filter(capitalizeFirst)
const data = ['apple', 'banana', 'orange', 'strawberry']
const capitalizeFirst = text => text.slice(0, 1).toUpperCase() + text.slice(1)
const fruits = data.map(capitalizeFirst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment