Kendall Tau Distance/Measure of Discordance?

Might be a trivial question, but while KendallTau is a built-in function, I couldn’t find Kendall tau distance - Wikipedia (i.e. normalised Discordance) in the function library. Am I wrong? Could anybody help pls? Kind thanks!

Using: ChatGPT to write the code and using example from wikipedia:

  kendallTau[x_, y_, len_] := 
   Module[{i, j, v = 0}, 
    For[i = 0, i < len, i++, 
     For[j = i + 1, j < len, j++, 
      If[x[[i]] < x[[j]] && y[[i]] > y[[j]] || 
        x[[i]] > x[[j]] && y[[i]] < y[[j]], v++]]];
    Abs[v]]; 
  normalize[kt_, len_] := kt/(len*(len - 1)/2)

  list1 = {1, 2, 3, 4, 5};
  list2 = {3, 4, 1, 2, 5};
  
  normalize[kendallTau[list1, list2, Length[list1]], Length[list1]] // N(*list1 is equal to list2, length are the same*)

  (*0.4*)

or:

 normalize[kendallTau[list1, list2, Length[list2]], Length[list2]] // N

 (*0.4*)

Kind thanks indeed. I was kinda counting on Wolfram having this as a built-in function, which apparently isn’t the case. So your reply is very useful and much appreciated.
Sincerely,
Poomjai

yes Mathematica only computes the Kendal correlation Kc.
However its relationship with the normalized distance Kn is extremely simple:

Kn:=(1-Kc)/2

as described in the same Wikipedia article

Kind thanks

Great thanks. Been quite impressed w/ ChatGPT myself.
Cheers!