Skip to content

Instantly share code, notes, and snippets.

@emmanueltouzery
Created March 12, 2017 13:02
Show Gist options
  • Save emmanueltouzery/e12815e0ae52315d53d3814afd7dd1c3 to your computer and use it in GitHub Desktop.
Save emmanueltouzery/e12815e0ae52315d53d3814afd7dd1c3 to your computer and use it in GitHub Desktop.
import {Map, List, Seq, Collection} from "immutable";
declare module "immutable" {
module Collection {
interface Collection<K, V> {
concat(valuesOrCollections: Array<V>): Collection<K, V>;
}
}
}
console.error(List([1,2,3])
.flatMap(x => [x, 5])
.concat([7,8,9])
.flatMap(x => [x, 5]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment