Is this a good example of tail recursion in F #?

let shuffley (numbers:int list) = let rec loop numbers acc = match numbers with | head::tail -> loop (List.rev(tail)) (head::acc) | [] -> List.rev(acc) loop numbers [] shuffley [1;2;3;4;5;6;7;8] 

I am trying to practice in F #, and I was wondering if this could be a good example of tail recursion, or is this just some kind of stupid thing.

+5
source share

Source: https://habr.com/ru/post/1240971/


All Articles