Flat can flatten any level of nesting (it just defaults to 1), so would be difficult to implement in terms of flatMap.
function flatten(x, n=1) { return n > 0 ? x.flatmap(y => flatten(y, n-1)) : x; }