Skip to content

Instantly share code, notes, and snippets.

Forked from samgiles/flatMap.js
Created December 21, 2017 15:10
What would you like to do?
Javascript flatMap implementation
// [B](f: (A) ⇒ [B]): [B] ; Although the types in the arrays aren't strict (:
Array.prototype.flatMap = function(lambda) {
return Array.prototype.concat.apply([],;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment