Skip to content

Instantly share code, notes, and snippets.

@evaporei
Last active November 28, 2025 13:44
Show Gist options
  • Select an option

  • Save evaporei/dd7e78d34f19923f93598d45f7d5cf60 to your computer and use it in GitHub Desktop.

Select an option

Save evaporei/dd7e78d34f19923f93598d45f7d5cf60 to your computer and use it in GitHub Desktop.
Category Theory - Monad JavaScript flatMap
console.log('flatten list:', [1, 2, 3].flatMap(x => [x * 2])) // [2, 4, 6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment