This is common in the functional paradigm, although syntax and semantics varies in sometimes important ways among languages.
There's a long-standing TC39 proposal to add it to JS. It's interesting to read it to see examples of the aforementioned differences.