C can’t do that. But imperative programming can. Nothing about type based pattern matching is constrained to FP.
If the FP community wants to say that impure languages have been "doing FP" for decades then great! The religious war is over! We can happily have mixed paradigm languages and move on. But that's not what I'm seeing.