Create random list of size n using 2 enums in F#
I second Mark Seemann's remark regarding enums. It makes much more sense to use discriminated unions to describe the entities in your domain.

A randomizing function will never look completely nice and functional, as it uses a side-effect by definition. Nevertheless, I think there isn't much point in passing around the random seed. It can be initialized once in the beginning of your function.

I think things get much clearer when the function randomHand has the call to List.init as its last line, showing that it creates and returns a list. The card generating function could in principle be made into a lambda, but I couldn't squeeze it into less than 7 lines and fslint doesn't like it...

Here's my suggestion:

type Suit = Club | Diamond | Spade | Heart
type Rank = Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten | Jack | Queen | King | Ace
type Card = 
  { Suit: Suit 
    Rank: Rank }

let randomHand size =
  let randomSeed = System.Random ()
  let randomCard _ =
    { Suit = match randomSeed.Next(1, 5) with
             | 1 -&gt; Club | 2 -&gt; Diamond | 3 -&gt; Spade | 4 -&gt; Heart
             | _ -&gt; failwith "random value out of bounds"
      Rank = match randomSeed.Next(2, 15) with
             | 2  -&gt; Two   | 3  -&gt; Three | 4  -&gt; Four | 5  -&gt; Five | 6  -&gt; Six
             | 7  -&gt; Seven | 8  -&gt; Eight | 9  -&gt; Nine | 10 -&gt; Ten  | 11 -&gt; Jack
             | 12 -&gt; Queen | 13 -&gt; King  | 14 -&gt; Ace
             | _ -&gt; failwith "random value out of bounds" }
  List.init size randomCard


Since System.Random.Next() is not bound to a range by its type (int), I had to handle the potential case that it might return a value out of bounds.