This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Description
I tried this example in the docs and the returned array isn't changed at all
var array = Immutable(["drop the numbers!", 3, 2, 1, 0, null, undefined]);
Immutable.flatMap(array, function(value) {
if (typeof value === "number") {
return [];
} else {
return value;
}
});
// expected: ["drop the numbers!", null, undefined]
// reality: ["drop the numbers!", 3, 2, 1, 0, null, undefined]
I'm using seamless-immutable v7.1.4. Is this a bug or am I doing anything wrong?