12 Days of Christmas with F# I've implemented 12 Days of Christmas just by using pattern matching. It's not very efficient as it performs 12 iterations, each performing its own iteration (potentially from 12 down to 1... does tail recursion kick in here though?) but I supposed I can live with that at the moment. I'm more concerned with learning how idiomatic F# is written. Would an F# programmer be more concerned with creating types, etc.?

module Christmas
let getOrdinal num =
    match num with
    | 1 -&gt; sprintf "%ist" num
    | 2 -&gt; sprintf "%ind" num
    | 3 -&gt; sprintf "%ird" num
    | _ -&gt; sprintf "%ith" num

let getPreamble num =
    sprintf "On the %s day of Christmas, my true love gave to me" (getOrdinal num)

let rec getVerse verse num = 
    match num with
    | 12 -&gt; getVerse (List.append verse ["12 drummers drumming"]) (num - 1)
    | 11 -&gt; getVerse (List.append verse ["11 pipers piping"]) (num - 1)
    | 10 -&gt; getVerse (List.append verse ["10 lords a-leaping"]) (num - 1)
    | 9 -&gt; getVerse (List.append verse ["9 ladies dancing"]) (num - 1)
    | 8 -&gt; getVerse (List.append verse ["8 maids a-milking"]) (num - 1)
    | 7 -&gt; getVerse (List.append verse ["7 swans a-swimming"]) (num - 1)
    | 6 -&gt; getVerse (List.append verse ["6 geese a-laying"]) (num - 1)
    | 5 -&gt; getVerse (List.append verse ["5 golden rings"]) (num - 1)
    | 4 -&gt; getVerse (List.append verse ["4 calling birds"]) (num - 1)
    | 3 -&gt; getVerse (List.append verse ["3 French hens"]) (num - 1)
    | 2 -&gt; getVerse (List.append verse ["2 turtle doves, and"]) (num - 1)
    | _ -&gt; List.append verse ["A partridge in a pear tree"]

let composeVerse num =
    List.append [getPreamble num] (getVerse [] num)
    |&gt; List.fold (fun r s -&gt; r + s + "\n") ""


[1 .. 12]
|&gt; Seq.iter (fun a -&gt; printfn "%s" (composeVerse a))
You should generally avoid List.append because appending to a singly-linked list is quite inefficient.

I think your getVerse function is probably doing too much. You can have a function to get a line at a time which is just int -&gt; string

Recursion can be avoided here if you switch to a list comprehension (the for...in syntax). Recursion is rarely needed in F#.

Even folding can be avoided here as it's simpler to use String.concat.

With all of these changes and a couple more:

let ordinalSuffix = function 1 -&gt; "st" | 2 -&gt; "nd" | 3 -&gt; "rd" | _ -&gt; "th"

let preamble num =
    sprintf "On the %i%s day of Christmas, my true love gave to me" num (ordinalSuffix num)

let line num = 
    match num with
    | 12 -&gt; "12 drummers drumming"
    | 11 -&gt; "11 pipers piping"
    | 10 -&gt; "10 lords a-leaping"
    | 9 -&gt; "9 ladies dancing"
    | 8 -&gt; "8 maids a-milking"
    | 7 -&gt; "7 swans a-swimming"
    | 6 -&gt; "6 geese a-laying"
    | 5 -&gt; "5 golden rings"
    | 4 -&gt; "4 calling birds"
    | 3 -&gt; "3 French hens"
    | 2 -&gt; "2 turtle doves, and"
    | _ -&gt; "A partridge in a pear tree"

let verse num =
    preamble num :: [ for i in num .. -1 .. 1 -&gt; line i ]
    |&gt; String.concat "\n"

[1 .. 12] |&gt; List.map verse |&gt; String.concat "\n\n" |&gt; printfn "%s"