Comment by kaoD

Comment by kaoD 3 hours ago

1 reply

For those unfamiliar with TS, the above is just...

    function flat([head, ...tail]) {
      return Array.isArray(head)
        ? [...flat(head), ...flat(tail)]
        : [head, ...flat(tail)]
    }
...in TS syntax.
tomsmeding 2 hours ago

Well, it is the type of that, in TS syntax. Few are the statically-typed languages that can even express that type.